RepositoryFactoryBean extends org.springframework.extensions.jcr.RepositoryFactoryBean { protected Repository createRepository() throws Exception { return RepositoryImpl.create(repositoryConfig); }  void destroy(); Resource getHomeDir(); void setHomeDir(Resource defaultRepDir); RepositoryConfig getRepositoryConfig(); void setRepositoryConfig(RepositoryConfig repositoryConfig);  }
@Test public void testCreateRepository() throws Exception { factory.afterPropertiesSet(); Repository rep = (Repository) factory.getObject(); assertEquals(rep.getDescriptor("jcr.repository.name"), "Jackrabbit"); assertEquals(true, factory.getObject() instanceof Repository); assertEquals(true, factory.isSingleton()); assertEquals(Repository.class, factory.getObjectType()); factory.destroy(); }