### Question:
DssTcpSslChannelInitializer extends DssTcpChannelInitializer { @Override protected void initChannel(SocketChannel ch) { logger.info("Try to initChannel"); final ChannelPipeline p = ch.pipeline(); p.addLast(sslCtx.newHandler(ch.alloc())); p.addLast(new DssTcpHandler()); } DssTcpSslChannelInitializer(SslContext sslContext);   }### Answer:
@Test void initChannel() throws Exception { Mockito .when(socketChannel.pipeline()) .thenReturn(channelPipeline); Mockito .when(channelPipeline.addLast(any())) .thenReturn(channelPipeline); Mockito .when(channelPipeline.last()) .thenReturn(new DssTcpHandler()); final DssTcpSslChannelInitializer dssTcpSslChannelInitializer = Mockito.mock(DssTcpSslChannelInitializer.class); dssTcpSslChannelInitializer.initChannel(socketChannel); final ChannelPipeline p = socketChannel.pipeline(); assertEquals(DssTcpHandler.class, p.last().getClass()); }