ByteArrayInputStream bais3 = new ByteArrayInputStream(raw3);
ByteArrayInputStream bais4 = new ByteArrayInputStream(raw4);
ByteArrayInputStream bais5 = new ByteArrayInputStream(raw2);
ByteArrayInputStream bais6 = new ByteArrayInputStream(raw3);
ByteArrayInputStream bais7 = new ByteArrayInputStream(raw4);
WebSocketCodec codec = new WebSocketCodec(true, false);
assertNull(codec.decode(bais1));
assertNull(codec.decode(bais2));
assertNull(codec.decode(bais3));
String s = new String(codec.decode(bais4));
System.out.println(s);
assertNotNull(s);
assertTrue(s.startsWith("REGISTER"));
assertNull(codec.decode(bais5));
assertNull(codec.decode(bais6));
s = new String(codec.decode(bais7));
System.out.println(s);
assertNotNull(s);
assertTrue(s.startsWith("REGISTER"));
}