Refactoring CreateTestRepository