finished unit test for RepositoryService