assertNull("No region node", remoteCache.getRoot().getChild( regionFqn ));
Configuration cfg = CacheTestUtil.buildConfiguration("test", SharedJBossCacheRegionFactory.class, true, true);
JBossCacheRegionFactory regionFactory = CacheTestUtil.startRegionFactory(cfg, getCacheTestSupport());
Region region = createRegion(regionFactory, "test/test", cfg.getProperties(), getCacheDataDescription());
Cache localCache = getJBossCache( regionFactory );
// This test assumes replication; verify that's correct
assertEquals("Cache is REPL_SYNC", "REPL_SYNC", localCache.getConfiguration().getCacheModeString());
// Region creation should not have affected remoteCache
assertNull("No region node", remoteCache.getRoot().getChild( regionFqn ));
Node regionRoot = localCache.getRoot().getChild( regionFqn );
assertTrue("Has a node at " + regionFqn, regionRoot != null );
assertTrue(regionFqn + " is resident", regionRoot.isResident() );
// Confirm region destroy does not affect remote cache
Option option = new Option();
option.setCacheModeLocal(true);
remoteCache.getInvocationContext().setOptionOverrides(option);
remoteCache.put(regionFqn, "test", "test");
assertEquals("Put succeeded", "test", remoteCache.get(regionFqn, "test"));
assertNull("Put was local", localCache.get(regionFqn, "test"));
region.destroy();
assertEquals("Remote cache unchanged", "test", remoteCache.get(regionFqn, "test"));
assertNull("No region node", localCache.getRoot().getChild( regionFqn ));
}