### Question:
DelegatingInboundHandler extends ChannelInboundHandlerAdapter { @Override public void channelInactive(final ChannelHandlerContext ctx) { LOG.debug("Channel inactive"); if (!inactiveMessageSent) { DisconnectEventBuilder builder = new DisconnectEventBuilder(); builder.setInfo("Channel inactive"); consumer.consume(builder.build()); inactiveMessageSent = true; } } DelegatingInboundHandler(final MessageConsumer connectionAdapter); @Override void channelRead(final ChannelHandlerContext ctx, final Object msg); @Override void channelInactive(final ChannelHandlerContext ctx); @Override void channelUnregistered(final ChannelHandlerContext ctx);  }### Answer:
@Test public void testChannelInactive() { dih.channelInactive(mockChHndlrCtx); verify( mockMsgConsumer, times(1)).consume(any(DataObject.class)); }