PropertiesSerializer extends MatchingSerializer { @Override public Object readID(final ByteBuffer buffer) { final CachedSerializationProperty idProperty = cachedProperties[BO.getIdIndex()]; Object id = DecoratedKryo.readPropertyValue( kryo, idProperty, buffer ); buffer.clear(); return id; } PropertiesSerializer(final DecoratedKryo kryo, final BO entityMetadata); @Override void write(final ByteBuffer buffer,
                      final Object object); @Override Object readID(final ByteBuffer buffer); @Override Object read(final ByteBuffer buffer); SerializationEntry readToSerializedEntry(final ByteBuffer buffer); @Override Class getType();  }
@Test public void canReadIdProperty() { ObjectBuffer objectBuffer = new ObjectBuffer( kryo ); byte[] data = objectBuffer.writeObjectData( CacheStoreEntryWrapper.writeValueOf( bo, entity1 ) ); assertThat( serializer.readID( ByteBuffer.wrap( data ) ), is( notNullValue() ) ); }