@Override
    public void write(final MySQLPacketPayload payload, final Object value) {
        if (value instanceof BigDecimal) {
            payload.writeInt8(((BigDecimal) value).longValue());
        } else if (value instanceof Integer) {
            payload.writeInt8(((Integer) value).longValue());
        } else if (value instanceof BigInteger) {
            payload.writeInt8(((BigInteger) value).longValue());
        } else {
            payload.writeInt8((Long) value);
        }
    }
@Test
    void assertWriteWithBigDecimal() {
        new MySQLInt8BinaryProtocolValue().write(payload, new BigDecimal(1L));
        verify(payload).writeInt8(1L);
    }