### Question:
TableMapEvent { public void parsePayload(final ByteBuf in) { schemaName = DataTypesCodec.readFixedLengthString(DataTypesCodec.readUnsignedInt1(in), in); DataTypesCodec.readNul(in); tableName = DataTypesCodec.readFixedLengthString(DataTypesCodec.readUnsignedInt1(in), in); DataTypesCodec.readNul(in); long columnCount = DataTypesCodec.readLengthCodedIntLE(in); initColumnDefs((int) columnCount); decodeColumnType(in); long columnMetaDefDataLength = DataTypesCodec.readLengthCodedIntLE(in); decodeColumnMeta(in); DataTypesCodec.readBitmap((int) columnCount, in); }  void parsePostHeader(final ByteBuf in); void parsePayload(final ByteBuf in);  }### Answer:
@Test public void assertParsePayload() { byte[] schemaBytes = TEST_SCHEMA.getBytes(); byte[] tableBytes = TEST_TABLE.getBytes(); int bitmapSize = (4 + 8) / 7; ByteBuf payload = Unpooled.buffer(1 + schemaBytes.length + 1 + 1 + tableBytes.length + 1 + 5 + 6 + bitmapSize); payload.writeByte(schemaBytes.length); payload.writeBytes(schemaBytes); payload.writeByte(0x00); payload.writeByte(tableBytes.length); payload.writeBytes(tableBytes); payload.writeByte(0x00); payload.writeByte(0x04); payload.writeByte(ColumnTypes.MYSQL_TYPE_INT24); payload.writeByte(ColumnTypes.MYSQL_TYPE_DATETIME2); payload.writeByte(ColumnTypes.MYSQL_TYPE_NEWDECIMAL); payload.writeByte(ColumnTypes.MYSQL_TYPE_VARCHAR); payload.writeByte(0x04); payload.writeByte(0x01); payload.writeShort(2); payload.writeShortLE(3); payload.writeBytes(new byte[bitmapSize]); TableMapEvent actual = new TableMapEvent(); actual.parsePayload(payload); assertThat(actual.getSchemaName(), is(TEST_SCHEMA)); assertThat(actual.getTableName(), is(TEST_TABLE)); ColumnDef[] actualColumnDefs = actual.getColumnDefs(); assertThat(actualColumnDefs.length, is(4)); assertThat(actualColumnDefs[0].getType(), is(ColumnTypes.MYSQL_TYPE_INT24)); assertThat(actualColumnDefs[1].getType(), is(ColumnTypes.MYSQL_TYPE_DATETIME2)); assertThat(actualColumnDefs[2].getType(), is(ColumnTypes.MYSQL_TYPE_NEWDECIMAL)); assertThat(actualColumnDefs[3].getType(), is(ColumnTypes.MYSQL_TYPE_VARCHAR)); assertThat(actualColumnDefs[0].getMeta(), is(0)); assertThat(actualColumnDefs[1].getMeta(), is(1)); assertThat(actualColumnDefs[2].getMeta(), is(2)); assertThat(actualColumnDefs[3].getMeta(), is(3)); }