FinalUpstreamHandler extends SimpleChannelHandler { @Override public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e) { } FinalUpstreamHandler(String self); @Override void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e); @Override void channelClosed(ChannelHandlerContext ctx, ChannelStateEvent e); @Override void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e);  }
@Test public void shouldDropConnectedEvent() { UpstreamChannelStateEvent event = spy(new UpstreamChannelStateEvent(channel, ChannelState.CONNECTED, InetSocketAddress.createUnresolved("remote-host", 8888))); handler.channelConnected(ctx, event); verifyNoMoreInteractions(ctx, event); }
@Test public void shouldDropChannelClosedEvent() { UpstreamChannelStateEvent event = spy(new UpstreamChannelStateEvent(channel, ChannelState.CONNECTED, null)); handler.channelConnected(ctx, event); verifyNoMoreInteractions(ctx, event); }