refactoring tests and test fixtures