PostgreSQLDateBinaryProtocolValue implements PostgreSQLBinaryProtocolValue { @Override public void write(final PostgreSQLPacketPayload payload, final Object value) { payload.writeInt8(((Timestamp) value).getTime()); }  @Override int getColumnLength(final Object value); @Override Object read(final PostgreSQLPacketPayload payload); @Override void write(final PostgreSQLPacketPayload payload, final Object value);  }
@Test public void assertWrite() { Timestamp data = new Timestamp(System.currentTimeMillis()); new PostgreSQLDateBinaryProtocolValue().write(payload, data); verify(payload).writeInt8(data.getTime()); }