@Override
    public void write(final MySQLPacketPayload payload, final Object value) {
        if (value instanceof BigDecimal) {
            payload.writeInt4(((BigDecimal) value).intValue());
        } else if (value instanceof Integer) {
            payload.writeInt4((Integer) value);
        } else {
            payload.writeInt4(((Long) value).intValue());
        }
    }
@Test
    void assertWrite() {
        new MySQLInt4BinaryProtocolValue().write(payload, 1);
        verify(payload).writeInt4(1);
    }