@Test(timeout = 10000)
public void testReplaceAndForwardOutbound() throws Exception {

    final BufferedTestHandler handler1 = new BufferedTestHandler();
    final BufferedTestHandler handler2 = new BufferedTestHandler();
    setUp(handler1);
    self.eventLoop().submit(new Runnable() {
        @Override
        public void run() {
            ChannelPipeline p = self.pipeline();
            handler1.outboundBuffer.add(8);
            assertEquals(8, handler1.outboundBuffer.peek());
            assertTrue(handler2.outboundBuffer.isEmpty());
            p.replace(handler1, "handler2", handler2);
            assertEquals(8, handler2.outboundBuffer.peek());
        }
    }).sync();
}