public void testInjectedCacheInstanceManager() {
Configuration cfg = CacheTestUtil.buildConfiguration("", JBossCacheRegionFactory.class, true, true);
CacheInstanceManager cim = new MultiplexingCacheInstanceManager();
JBossCacheRegionFactory regionFactory = new JBossCacheRegionFactory(cim);
Settings settings = cfg.buildSettings();
Properties properties = cfg.getProperties();
regionFactory.start(settings, properties);
// Ensure we clean up
registerFactory(regionFactory);
assertEquals("Used injected CacheInstanceManager", cim, regionFactory.getCacheInstanceManager());
CacheTestUtil.stopRegionFactory(regionFactory, getCacheTestSupport());
}