### Question:
LoggingHandler implements InboundHandler, OutboundHandler { @Override public void beforeSendPacket(final Packet packet, final PipelineContext ctx) { log.info(">>> {} sent state={} packet={}", actor(), ctx.getState(), packet); ctx.next(packet); } LoggingHandler(final boolean isClient); @Override void onReceivePacket(final Packet packet, final PipelineContext ctx); @Override void beforeSendPacket(final Packet packet, final PipelineContext ctx);  }### Answer:
@Test public void send() { final Packet packet = p(PingFrame.INSTANCE); handler.beforeSendPacket(packet, ctx); verify(ctx).next(packet); }