@Override
    public void write(final PostgreSQLPacketPayload payload, final Object value) {
        payload.writeInt8(((Number) value).longValue());
    }
@Test
    void assertWrite() {
        byte[] actual = new byte[24];
        PostgreSQLPacketPayload payload = new PostgreSQLPacketPayload(Unpooled.wrappedBuffer(actual).writerIndex(0), StandardCharsets.UTF_8);
        new PostgreSQLInt8BinaryProtocolValue().write(payload, -1);
        new PostgreSQLInt8BinaryProtocolValue().write(payload, Long.MAX_VALUE);
        new PostgreSQLInt8BinaryProtocolValue().write(payload, BigDecimal.valueOf(Long.MIN_VALUE));
        byte[] expected = new byte[]{
                (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
                (byte) 0x7F, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
                (byte) 0x80, 0, 0, 0, 0, 0, 0, 0};
        assertThat(actual, is(expected));
    }