public final void removeOutboundHandler() {
        checkAdded();
        outboundCtx.remove();
    }
@Test
    public void testOutboundEvents() {
        ChannelInboundHandler inboundHandler = new ChannelInboundHandlerAdapter();
        OutboundEventHandler outboundHandler = new OutboundEventHandler();

        CombinedChannelDuplexHandler<ChannelInboundHandler, ChannelOutboundHandler> handler =
                new CombinedChannelDuplexHandler<ChannelInboundHandler, ChannelOutboundHandler>(
                        inboundHandler, outboundHandler);

        EmbeddedChannel channel = new EmbeddedChannel();
        channel.pipeline().addLast(new OutboundEventHandler());
        channel.pipeline().addLast(handler);

        assertEquals(Event.HANDLER_ADDED, outboundHandler.pollEvent());

        doOutboundOperations(channel);

        assertOutboundOperations(outboundHandler);

        handler.removeOutboundHandler();

        assertEquals(Event.HANDLER_REMOVED, outboundHandler.pollEvent());

        // These should not be handled by the inboundHandler anymore as it was removed before
        doOutboundOperations(channel);

        // Should have not received any more events as it was removed before via removeInboundHandler()
        assertNull(outboundHandler.pollEvent());
        assertFalse(channel.finish());
        assertNull(outboundHandler.pollEvent());
    }