### Question:
BinlogEventHeader { public void fromBytes(final ByteBuf data) { timeStamp = DataTypesCodec.readUnsignedInt4LE(data); typeCode = DataTypesCodec.readUnsignedInt1(data); serverId = DataTypesCodec.readUnsignedInt4LE(data); eventLength = DataTypesCodec.readUnsignedInt4LE(data); endLogPos = DataTypesCodec.readUnsignedInt4LE(data); flags = DataTypesCodec.readUnsignedInt2LE(data); }  void fromBytes(final ByteBuf data);  }### Answer:
@Test public void assertFromBytes() { byte[] eventHeaderBytes = ByteBufUtil.decodeHexDump("00010203000100000010000000040000002000"); ByteBuf eventHeaderByteBuf = Unpooled.buffer(eventHeaderBytes.length); eventHeaderByteBuf.writeBytes(eventHeaderBytes); BinlogEventHeader actual = new BinlogEventHeader(); actual.fromBytes(eventHeaderByteBuf); assertThat(actual.getTimeStamp(), is(50462976L)); assertThat(actual.getTypeCode(), is(EventTypes.UNKNOWN_EVENT)); assertThat(actual.getServerId(), is(1L)); assertThat(actual.getEventLength(), is(16L)); assertThat(actual.getEndLogPos(), is(4L)); assertThat(actual.getFlags(), is(32)); }