@Override
    protected void write(final MySQLPacketPayload payload) {
        payload.writeStringLenenc(CATALOG);
        payload.writeStringLenenc(schema);
        payload.writeStringLenenc(table);
        payload.writeStringLenenc(orgTable);
        payload.writeStringLenenc(name);
        payload.writeStringLenenc(orgName);
        payload.writeIntLenenc(NEXT_LENGTH);
        payload.writeInt2(characterSet);
        payload.writeInt4(columnLength);
        payload.writeInt1(columnType.getValue());
        payload.writeInt2(flags);
        payload.writeInt1(decimals);
        payload.writeReserved(2);
        if (containDefaultValues) {
            payload.writeIntLenenc(0);
            payload.writeStringLenenc("");
        }
    }
@Test
    void assertWriteWithPayload() {
        when(payload.readInt1()).thenReturn(MySQLBinaryColumnType.LONG.getValue(), 0);
        when(payload.readInt2()).thenReturn(MySQLConstants.DEFAULT_CHARSET.getId(), 0);
        when(payload.readInt4()).thenReturn(10);
        when(payload.readIntLenenc()).thenReturn(0x0cL);
        when(payload.readStringLenenc()).thenReturn("def", "logic_db", "tbl", "tbl", "id", "id");
        MySQLColumnDefinition41Packet actual = new MySQLColumnDefinition41Packet(payload);
        actual.write(payload);
        verifyWrite();
    }