@Test public void testGeneratedTwoFrames() throws IOException { WebSocketPolicy policy = WebSocketPolicy.newClientPolicy(); DeflateFrameExtension ext = new DeflateFrameExtension(); ext.setPolicy(policy); ext.setConfig(new ExtensionConfig(ext.getName())); Generator generator = new Generator(policy, true); generator.configureFromExtensions(Collections.singletonList(ext)); OutgoingNetworkBytesCapture capture = new OutgoingNetworkBytesCapture(generator); ext.setNextOutgoingFrames(capture); ext.outgoingFrame(new TextFrame().setPayload("Hello"), null); ext.outgoingFrame(new TextFrame(), null); ext.outgoingFrame(new TextFrame().setPayload("There"), null); capture.assertBytes(0, "c107f248cdc9c90700"); }
@Override public String getName() { return "deflate-frame"; }
DeflateFrameExtension extends CompressExtension { @Override public String getName() { return "deflate-frame"; } }
DeflateFrameExtension extends CompressExtension { @Override public String getName() { return "deflate-frame"; }  }
DeflateFrameExtension extends CompressExtension { @Override public String getName() { return "deflate-frame"; }  @Override String getName(); @Override void incomingFrame(Frame frame); }
DeflateFrameExtension extends CompressExtension { @Override public String getName() { return "deflate-frame"; }  @Override String getName(); @Override void incomingFrame(Frame frame);  }