Fixed tests to run with new RepositoryFactory.