### Question:
CachingPartitionerSerializerDelegate extends KinesisPartitioner<T> implements KinesisSerializationSchema<T> { @Override public ByteBuffer serialize(T element) { return ByteBuffer.wrap(getLastOrCreateNewSerializedRecord(element).getData()); } CachingPartitionerSerializerDelegate(KinesisEgressSerializer<T> delegate); @Override ByteBuffer serialize(T element); @Override String getTargetStream(T element); @Override String getPartitionId(T element); @Override String getExplicitHashKey(T element);  }### Answer:
@Test public void serialize() { final CachingPartitionerSerializerDelegate<String> cachingDelegate = new CachingPartitionerSerializerDelegate<>(new DuplicateSerializationDetectingSerializer()); assertThat( cachingDelegate.serialize(TEST_INPUT), is(ByteBuffer.wrap(TEST_INPUT.getBytes(StandardCharsets.UTF_8)))); }