extracted Repository and added RepositoryTest