@Override
    protected void initChannel(SocketChannel socketChannel) throws Exception {
        if (sslCtx != null) {
            socketChannel.pipeline().addLast(sslCtx.newHandler(socketChannel.alloc()));
        }
        socketChannel.pipeline().addLast(new HttpServerCodec());
        socketChannel.pipeline().addLast(this.handler);
    }
@Test
    public void testChannelInitializer() throws Exception {
        NioSocketChannel channel = new NioSocketChannel();

        NettyHttpChannelInitializer nettyChannelInitializer = new NettyHttpChannelInitializer(
                new NettyHttpServerHandler(new NettySource()), null);
        nettyChannelInitializer.initChannel(channel);

        assertNotNull(channel.pipeline().toMap());
        assertEquals(2, channel.pipeline().toMap().size());
    }