@SneakyThrows(PSQLException.class)
    @Override
    public void write(final PostgreSQLPacketPayload payload, final Object value) {
        byte[] binaryDate = new byte[4];
        new TimestampUtils(false, null).toBinDate(null, binaryDate, (Date) value);
        payload.writeBytes(binaryDate);
    }
@Test
    void assertWrite() throws PSQLException {
        byte[] actual = new byte[4];
        PostgreSQLPacketPayload payload = new PostgreSQLPacketPayload(Unpooled.wrappedBuffer(actual).writerIndex(0), StandardCharsets.UTF_8);
        Date input = Date.valueOf("2023-01-30");
        new PostgreSQLDateBinaryProtocolValue().write(payload, input);
        byte[] expected = new byte[4];
        new TimestampUtils(false, null).toBinDate(null, expected, input);
        assertThat(actual, is(expected));
    }