Added unit tests for RepositoryFactory