System.out.println(TestingUtil.extractComponent(cache1, InterceptorChain.class).toString());
cache1.put("key", value);
assert cache1.containsKey("key");
assertSerializationCounts(1, 0);
DataContainer dc1 = TestingUtil.extractComponent(cache1, DataContainer.class);
InternalCacheEntry ice = dc1.get("key");
Object o = ice.getValue();
assert o instanceof MarshalledValue;
MarshalledValue mv = (MarshalledValue) o;
assertDeserialized(mv);
assert cache1.get("key").equals(value);
assertDeserialized(mv);
assertSerializationCounts(1, 0);
cache1.compact();
assertSerializationCounts(2, 0);
assertOnlyOneRepresentationExists(mv);
assertSerialized(mv);
// now on cache 2
DataContainer dc2 = TestingUtil.extractComponent(cache2, DataContainer.class);
ice = dc2.get("key");
o = ice.getValue();
assert o instanceof MarshalledValue;
mv = (MarshalledValue) o;
assertSerialized(mv); // this proves that unmarshalling on the recipient cache instance is lazy