@Override
    public void write(final MySQLPacketPayload payload, final Object value) {
        if (value instanceof byte[]) {
            payload.writeBytesLenenc((byte[]) value);
        } else {
            payload.writeStringLenenc(value.toString());
        }
    }
@Test
    void assertWrite() {
        byte[] input = {0x0a, 0x33, 0x18, 0x01, 0x4a, 0x08, 0x0a, (byte) 0x9a, 0x01, 0x18, 0x01, 0x4a, 0x6f};
        byte[] expected = {0x0d, 0x0a, 0x33, 0x18, 0x01, 0x4a, 0x08, 0x0a, (byte) 0x9a, 0x01, 0x18, 0x01, 0x4a, 0x6f};
        ByteBuf actual = Unpooled.wrappedBuffer(new byte[expected.length]).writerIndex(0);
        MySQLPacketPayload payload = new MySQLPacketPayload(actual, StandardCharsets.UTF_8);
        new MySQLByteLenencBinaryProtocolValue().write(payload, input);
        assertThat(ByteBufUtil.getBytes(actual), is(expected));
    }