### Question:
EofPacket extends AbstractPacket { @Override public void fromByteBuf(final ByteBuf data) { fieldCount = DataTypesCodec.readUnsignedInt1(data); warningCount = DataTypesCodec.readUnsignedInt2LE(data); statusFlag = DataTypesCodec.readUnsignedInt2LE(data); }  @Override void fromByteBuf(final ByteBuf data);  }### Answer:
@Test public void assertFromByteBuf() { ByteBuf byteBuf = Unpooled.buffer(); byteBuf.writeByte(0x01); byteBuf.writeShortLE(Short.MIN_VALUE); byteBuf.writeShortLE(Short.MIN_VALUE); EofPacket actual = new EofPacket(); actual.fromByteBuf(byteBuf); assertThat(actual.getFieldCount(), is((short) 1)); assertThat(actual.getWarningCount(), is(32768)); assertThat(actual.getStatusFlag(), is(32768)); }