<V> void doExtractionTest(final T object,
                              final Function<ByteBuffer, V> extractionFunc,
                              final Function<T, V> expectedValueFunc) {
        ByteBuffer byteBuffer = serialize(object);
        ByteBuffer byteBufferClone = byteBuffer.asReadOnlyBuffer();

        V actualExtractedValue = extractionFunc.apply(byteBuffer);

        assertThat(actualExtractedValue).isEqualTo(expectedValueFunc.apply(object));

        // ensure bytebuffer has not been mutated in the process
        assertThat(byteBuffer).isEqualTo(byteBufferClone);
    }
Used for testing the extraction of a single value from part of the serialised form.

@param object            The object to be serialised
@param extractionFunc    The extraction method on the serde to use
@param expectedValueFunc The method on the object that gets the value being tested
stroom-lmdb/src/test/java/stroom/lmdb/serde/AbstractSerdeTest.java