@Test public void testIfSpringEmbeddedCacheManagerFactoryBeanCreatesACustomizedCacheManagerIfGivenADefaultConfigurationLocation() throws Exception { objectUnderTest = SpringEmbeddedCacheManagerFactoryBeanBuilder .defaultBuilder().fromFile(NAMED_ASYNC_CACHE_CONFIG_LOCATION, getClass()).build(); final SpringEmbeddedCacheManager springEmbeddedCacheManager = objectUnderTest.getObject(); assertNotNull( "getObject() should have returned a valid SpringEmbeddedCacheManager, configured using the configuration file " + "set on SpringEmbeddedCacheManagerFactoryBean. However, it returned null.", springEmbeddedCacheManager); final SpringCache cacheDefinedInCustomConfiguration = springEmbeddedCacheManager .getCache(CACHE_NAME_FROM_CONFIGURATION_FILE); final org.infinispan.configuration.cache.Configuration configuration = ((Cache) cacheDefinedInCustomConfiguration.getNativeCache()) .getCacheConfiguration(); assertEquals( "The cache named [" + CACHE_NAME_FROM_CONFIGURATION_FILE + "] is configured to have asynchonous replication cache mode. Yet, the cache returned from getCache(" + CACHE_NAME_FROM_CONFIGURATION_FILE + ") has a different cache mode. Obviously, SpringEmbeddedCacheManagerFactoryBean did not use " + "the configuration file when instantiating SpringEmbeddedCacheManager.", org.infinispan.configuration.cache.CacheMode.REPL_ASYNC, configuration.clustering().cacheMode()); }
@Override public SpringEmbeddedCacheManager getObject() throws Exception { return this.cacheManager; }
SpringEmbeddedCacheManagerFactoryBean extends AbstractEmbeddedCacheManagerFactory implements FactoryBean<SpringEmbeddedCacheManager>, InitializingBean, DisposableBean { @Override public SpringEmbeddedCacheManager getObject() throws Exception { return this.cacheManager; } }
SpringEmbeddedCacheManagerFactoryBean extends AbstractEmbeddedCacheManagerFactory implements FactoryBean<SpringEmbeddedCacheManager>, InitializingBean, DisposableBean { @Override public SpringEmbeddedCacheManager getObject() throws Exception { return this.cacheManager; }  }
SpringEmbeddedCacheManagerFactoryBean extends AbstractEmbeddedCacheManagerFactory implements FactoryBean<SpringEmbeddedCacheManager>, InitializingBean, DisposableBean { @Override public SpringEmbeddedCacheManager getObject() throws Exception { return this.cacheManager; }  @Override void afterPropertiesSet(); @Override SpringEmbeddedCacheManager getObject(); @Override Class<? extends SpringEmbeddedCacheManager> getObjectType(); @Override boolean isSingleton(); @Override void destroy(); }
SpringEmbeddedCacheManagerFactoryBean extends AbstractEmbeddedCacheManagerFactory implements FactoryBean<SpringEmbeddedCacheManager>, InitializingBean, DisposableBean { @Override public SpringEmbeddedCacheManager getObject() throws Exception { return this.cacheManager; }  @Override void afterPropertiesSet(); @Override SpringEmbeddedCacheManager getObject(); @Override Class<? extends SpringEmbeddedCacheManager> getObjectType(); @Override boolean isSingleton(); @Override void destroy();  }