extract test data factory to separate file

Minor tests refactoring