Parser parser = new UnitParser(policy);
IncomingFramesCapture capture = new IncomingFramesCapture();
parser.setIncomingFramesHandler(capture);
parser.parse(expected);
capture.assertNoErrors();
capture.assertHasFrame(OpCode.PING,1);
Frame pActual = capture.getFrames().poll();
Assert.assertThat("PingFrame.payloadLength",pActual.getPayloadLength(),is(message.length()));
Assert.assertEquals("PingFrame.payload",message.length(),pActual.getPayloadLength());