@Test public void testIfSpringEmbeddedCacheManagerFactoryBeanAllowesOverridingConfigurationBuilder() throws Exception { ConfigurationBuilder overriddenBuilder = new ConfigurationBuilder(); overriddenBuilder.locking().concurrencyLevel(100); objectUnderTest = SpringEmbeddedCacheManagerFactoryBeanBuilder .defaultBuilder().fromFile(NAMED_ASYNC_CACHE_CONFIG_LOCATION, getClass()) .withConfigurationBuilder(overriddenBuilder).build(); final SpringEmbeddedCacheManager springEmbeddedCacheManager = objectUnderTest.getObject(); assertEquals( "Concurrency value of LockingLocking for cache configured in" + CACHE_NAME_FROM_CONFIGURATION_FILE + "is equal to 5000. But later Configuration Builder overrides " + "this setting to 100. Obviously created SpringEmbeddedCacheManagerFactoryBean does not support " + "this kind of overriding.", 100, springEmbeddedCacheManager.getNativeCacheManager().getDefaultCacheConfiguration().locking() .concurrencyLevel()); }
@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();  }