@Override
    public PrimitiveTypeEncoding<UTF8Buffer> getEncoding(UTF8Buffer value) {
        return value.getLength() <= 255 ? smallBufferEncoding : largeBufferEncoding;
    }
@Test
    public void testGetEncodingForSmallUTF8Buffer() {
        PrimitiveTypeEncoding<UTF8Buffer> encoding = utf8BufferEncoding.getEncoding(smallBuffer);

        assertTrue(encoding instanceof UTF8BufferType.SmallUTF8BufferEncoding);
        assertEquals(1, encoding.getConstructorSize());
        assertEquals(smallBuffer.getLength() + Byte.BYTES, encoding.getValueSize(smallBuffer));
        assertEquals(EncodingCodes.STR8, encoding.getEncodingCode());
        assertFalse(encoding.encodesJavaPrimitive());
        assertEquals(utf8BufferEncoding, encoding.getType());
    }