ICacheElementSerialized element = new CacheElementSerialized( cacheName, key, elementSerializer
.serialize( value ), attr );
listener.handlePut( element );
ICacheElement after = cacheMgr.getCache( cacheName ).get( key );
assertNotNull( "Should have a deserialized object.", after );
assertEquals( "Values should be the same.", value, after.getVal() );
assertEquals( "Attributes should be the same.", attr.getMaxLifeSeconds(), after
.getElementAttributes().getMaxLifeSeconds() );
assertEquals( "Keys should be the same.", key, after.getKey() );
assertEquals( "Cache name should be the same.", cacheName, after.getCacheName() );
}