### Question:
FieldPacket extends AbstractPacket { @Override public void fromByteBuf(final ByteBuf data) { catalog = DataTypesCodec.readLengthCodedString(data); schema = DataTypesCodec.readLengthCodedString(data); table = DataTypesCodec.readLengthCodedString(data); originalTable = DataTypesCodec.readLengthCodedString(data); fieldName = DataTypesCodec.readLengthCodedString(data); originalFieldName = DataTypesCodec.readLengthCodedString(data); character = DataTypesCodec.readUnsignedInt2LE(data); length = DataTypesCodec.readUnsignedInt4LE(data); type = DataTypesCodec.readUnsignedInt1(data); flags = DataTypesCodec.readUnsignedInt2LE(data); decimals = DataTypesCodec.readUnsignedInt1(data); data.readerIndex(data.readerIndex() + 2); definition = DataTypesCodec.readLengthCodedString(data); }  @Override void fromByteBuf(final ByteBuf data);  }### Answer:
@Test public void assertFromByteBuf() { ByteBuf byteBuf = Unpooled.buffer(); byteBuf.writeByte(CATALOG.length()); byteBuf.writeBytes(CATALOG.getBytes()); byteBuf.writeByte(SCHEMA.length()); byteBuf.writeBytes(SCHEMA.getBytes()); byteBuf.writeByte(TABLE.length()); byteBuf.writeBytes(TABLE.getBytes()); byteBuf.writeByte(ORIGINAL_TABLE.length()); byteBuf.writeBytes(ORIGINAL_TABLE.getBytes()); byteBuf.writeByte(FIELD_NAME.length()); byteBuf.writeBytes(FIELD_NAME.getBytes()); byteBuf.writeByte(ORIGIN_FIELD_NAME.length()); byteBuf.writeBytes(ORIGIN_FIELD_NAME.getBytes()); byteBuf.writeShortLE(Short.MIN_VALUE); byteBuf.writeIntLE(Integer.MIN_VALUE); byteBuf.writeByte(0x80); byteBuf.writeShortLE(Short.MIN_VALUE); byteBuf.writeByte(0x80); byteBuf.writeBytes(new byte[2]); byteBuf.writeByte(DEFINITION.length()); byteBuf.writeBytes(DEFINITION.getBytes()); FieldPacket actual = new FieldPacket(); actual.fromByteBuf(byteBuf); assertThat(actual.getCatalog(), is(CATALOG)); assertThat(actual.getSchema(), is(SCHEMA)); assertThat(actual.getTable(), is(TABLE)); assertThat(actual.getOriginalTable(), is(ORIGINAL_TABLE)); assertThat(actual.getFieldName(), is(FIELD_NAME)); assertThat(actual.getOriginalFieldName(), is(ORIGIN_FIELD_NAME)); assertThat(actual.getCharacter(), is(32768)); assertThat(actual.getLength(), is(2147483648L)); assertThat(actual.getType(), is((short) 128)); assertThat(actual.getFlags(), is(32768)); assertThat(actual.getDecimals(), is((short) 128)); assertThat(actual.getDefinition(), is(DEFINITION)); }