@Override
    protected void write(final PostgreSQLPacketPayload payload) {
        payload.writeInt2(columnDescriptions.size());
        for (PostgreSQLColumnDescription each : columnDescriptions) {
            payload.writeStringNul(each.getColumnName());
            payload.writeInt4(each.getTableOID());
            payload.writeInt2(each.getColumnIndex());
            payload.writeInt4(each.getTypeOID());
            payload.writeInt2(each.getColumnLength());
            payload.writeInt4(each.getTypeModifier());
            payload.writeInt2(each.getDataFormat());
        }
    }
@Test
    void assertWrite() {
        PostgreSQLColumnDescription description = new PostgreSQLColumnDescription("name", 1, Types.VARCHAR, 4, null);
        PostgreSQLRowDescriptionPacket packet = new PostgreSQLRowDescriptionPacket(Collections.singleton(description));
        packet.write(payload);
        verify(payload, times(2)).writeInt2(1);
        verify(payload).writeStringNul("name");
        verify(payload).writeInt4(0);
        verify(payload, times(2)).writeInt2(1);
        verify(payload).writeInt4(1043);
        verify(payload).writeInt2(4);
        verify(payload).writeInt4(-1);
        verify(payload).writeInt2(0);
    }