@Test public void testFrameWriterLogsSaslFramesToTracer() { List<SaslFrameBody> bodies = new ArrayList<>(); transport.setProtocolTracer(new ProtocolTracer() { @Override public void sentSaslBody(final SaslFrameBody saslFrameBody) { bodies.add(saslFrameBody); } @Override public void receivedFrame(TransportFrame transportFrame) { } @Override public void sentFrame(TransportFrame transportFrame) { } }); SaslInit init = new SaslInit(); FrameWriter framer = new FrameWriter(encoder, Integer.MAX_VALUE, FrameWriter.SASL_FRAME_TYPE, transport); framer.writeFrame(0, init, null, null); assertEquals(1, bodies.size()); assertTrue(bodies.get(0) instanceof SaslInit); }
void writeFrame(Object frameBody) { writeFrame(0, frameBody, null, null); }
FrameWriter { void writeFrame(Object frameBody) { writeFrame(0, frameBody, null, null); } }
FrameWriter { void writeFrame(Object frameBody) { writeFrame(0, frameBody, null, null); } FrameWriter(EncoderImpl encoder, int maxFrameSize, byte frameType, TransportImpl transport); }
FrameWriter { void writeFrame(Object frameBody) { writeFrame(0, frameBody, null, null); } FrameWriter(EncoderImpl encoder, int maxFrameSize, byte frameType, TransportImpl transport);  }
FrameWriter { void writeFrame(Object frameBody) { writeFrame(0, frameBody, null, null); } FrameWriter(EncoderImpl encoder, int maxFrameSize, byte frameType, TransportImpl transport);   }