### Question:
LocalApiServerPipelineFactory extends ChannelInitializer<SocketChannel> { public void initChannel(SocketChannel ch) throws Exception { LoggingService.logDebug(MODULE_NAME, "Start Initialize channel for communication and assign handler"); ChannelPipeline pipeline = ch.pipeline(); if (sslCtx != null) { pipeline.addLast(sslCtx.newHandler(ch.alloc())); } pipeline.addLast(new HttpServerCodec()); pipeline.addLast(new HttpObjectAggregator(Integer.MAX_VALUE)); pipeline.addLast(new LocalApiServerHandler(executor)); LoggingService.logDebug(MODULE_NAME, "Finished Initialize channel for communication and assign handler"); } LocalApiServerPipelineFactory(SslContext sslCtx); void initChannel(SocketChannel ch);  }### Answer:
@Test public void testInitChannel() { try { localApiServerPipelineFactory.initChannel(channel); Mockito.verify(pipeline).addLast(Mockito.eq(httpObjectAggregator)); Mockito.verify(pipeline).addLast(Mockito.eq(serverHandler)); Mockito.verify(pipeline).addLast(Mockito.eq(httpServerCodec)); } catch (Exception e) { fail("This should not happen"); } }