frameRef.set(frame);
}
});
parser.parse(ByteBuffer.wrap(bytes1));
ControlFrame frame = frameRef.get();
Assert.assertNotNull(frame);
Assert.assertEquals(ControlFrameType.SYN_STREAM, frame.getType());
SynStreamFrame synStream = (SynStreamFrame)frame;
Assert.assertEquals(2, synStream.getVersion());
Assert.assertEquals(1, synStream.getStreamId());
Assert.assertEquals(0, synStream.getAssociatedStreamId());
Assert.assertEquals(0, synStream.getPriority());
Assert.assertNotNull(synStream.getHeaders());
Assert.assertFalse(synStream.getHeaders().isEmpty());
frameRef.set(null);
parser.parse(ByteBuffer.wrap(bytes2));
frame = frameRef.get();
Assert.assertNotNull(frame);
Assert.assertEquals(ControlFrameType.SYN_STREAM, frame.getType());
synStream = (SynStreamFrame)frame;
Assert.assertEquals(2, synStream.getVersion());
Assert.assertEquals(3, synStream.getStreamId());
Assert.assertEquals(0, synStream.getAssociatedStreamId());
Assert.assertEquals(2, synStream.getPriority());