Pojo key = new Pojo();
cache1.put(key, "value");
assertSerializationCounts(1, 0);
DataContainer dc1 = TestingUtil.extractComponent(cache1, DataContainer.class);
Object o = dc1.keySet().iterator().next();
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);
o = dc2.keySet().iterator().next();
assert o instanceof MarshalledValue;
mv = (MarshalledValue) o;
assertSerialized(mv);
assert cache2.get(key).equals("value");
assertSerializationCounts(2, 1);