IncomingFramesCapture capture = new IncomingFramesCapture();
parser.setIncomingFramesHandler(capture);
parser.parse(buf);
capture.assertNoErrors();
capture.assertHasFrame(OpCode.TEXT,1);
capture.assertHasFrame(OpCode.CONTINUATION,1);
WebSocketFrame txt = capture.getFrames().poll();
Assert.assertThat("TextFrame[0].data",txt.getPayloadAsUTF8(),is(part1));
txt = capture.getFrames().poll();
Assert.assertThat("TextFrame[1].data",txt.getPayloadAsUTF8(),is(part2));