MySQLInt8BinaryProtocolValue implements MySQLBinaryProtocolValue { @Override public void write(final MySQLPacketPayload payload, final Object value) { payload.writeInt8(value instanceof BigDecimal ? ((BigDecimal) value).longValue() : (Long) value); }  @Override Object read(final MySQLPacketPayload payload); @Override void write(final MySQLPacketPayload payload, final Object value);  }
@Test public void assertWriteWithLong() { new MySQLInt8BinaryProtocolValue().write(payload, 1L); verify(payload).writeInt8(1L); }
@Test public void assertWriteWithBigDecimal() { new MySQLInt8BinaryProtocolValue().write(payload, new BigDecimal(1L)); verify(payload).writeInt8(1L); }