### Question:
StreamFrame extends Frame { public static StreamFrame parse(final ByteBuf bb) { final byte firstByte = bb.readByte(); final boolean off = (firstByte & 0x04) == 0x04; final boolean len = (firstByte & 0x02) == 0x02; final boolean fin = (firstByte & 0x01) == 0x01; final long streamId = StreamId.parse(bb); final long offset; if (off) { offset = Varint.readAsLong(bb); } else { offset = 0; } final int length; if (len) { length = Varint.readAsInt(bb); } else { length = bb.readableBytes(); } final byte[] data = new byte[length]; bb.readBytes(data); return new StreamFrame(streamId, offset, fin, data); } StreamFrame(final long streamId, final long offset, final boolean fin, final byte[] data); static StreamFrame parse(final ByteBuf bb); long getStreamId(); long getOffset(); boolean isFin(); byte[] getData(); @Override void write(final ByteBuf bb); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void parse() { final ByteBuf bb = Unpooled.copiedBuffer(Hex.dehex("10c67daf169411a94e48656c6c6f")); final StreamFrame frame = StreamFrame.parse(bb); assertFalse(frame.isFin()); assertEquals(0, frame.getOffset()); assertEquals(467722447824726350L, frame.getStreamId()); assertArrayEquals(DATA, frame.getData()); }