assertEquals("v", caches.get(0).get(f, "k"));
assertEquals("v", caches.get(1).get(f, "k"));
// create the region on cache 0, make sure it is marked as a MARSHALLING region by attaching a class loader to it.
Region region0 = caches.get(0).getRegionManager().getRegion(f, true);
region0.registerContextClassLoader(this.getClass().getClassLoader()); // just to make sure this is recognised as a marshalling region.
assertTrue("Should be active by default", region0.isActive());
// make sure this newly created region is "recognised" as a marshalling region.
assertTrue(caches.get(0).getRegionManager().getAllRegions(Region.Type.MARSHALLING).contains(region0));
// now create a region on cache 1, as above.
Region region1 = caches.get(1).getRegionManager().getRegion(f, true);
region1.registerContextClassLoader(this.getClass().getClassLoader()); // just to make sure this is recognised as a marshalling region.
assertTrue("Should be active by default", region1.isActive());
// make sure this newly created region is "recognised" as a marshalling region.
assertTrue(caches.get(1).getRegionManager().getAllRegions(Region.Type.MARSHALLING).contains(region1));
// now deactivate the region on cache 1.
region1.deactivate();
assertFalse("Should be have deactivated", region1.isActive());
caches.get(0).put(f, "k", "v2");
assertEquals("v2", caches.get(0).get(f, "k"));
assertNull(caches.get(1).get(f, "k"));