### Question:
NettyServerTransport extends AbstractServerTransport<SendMsg, ReceMsg> { @Override public void start() { log.info("The NettyServerTransport will start"); super.start(); serverBootstrap = new ServerBootstrap(); bossGroup = new NioEventLoopGroup(1); if (Epoll.isAvailable()) { workerIoGroup = new EpollEventLoopGroup(workerThreads); } else { workerIoGroup = new NioEventLoopGroup(workerThreads); } serverBootstrap.group(bossGroup, workerIoGroup); serverBootstrap.localAddress(new InetSocketAddress(getNetAddress().getHost(), getNetAddress().getPort())); serverBootstrap.channel(Epoll.isAvailable() ? EpollServerSocketChannel.class : NioServerSocketChannel.class); serverBootstrap.childHandler(buildChannelInitializer()); serverBootstrap.option(ChannelOption.SO_BACKLOG, 1024); serverBootstrap.option(ChannelOption.SO_REUSEADDR, true); serverBootstrap.option(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT); serverBootstrap.childOption(ChannelOption.SO_KEEPALIVE, false); serverBootstrap.childOption(ChannelOption.TCP_NODELAY, true); Thread startThread = new Thread(() -> { try { ChannelFuture sync = serverBootstrap.bind().sync(); sync.channel().closeFuture().sync(); } catch (InterruptedException e) { throw new TransportException("netty serverBootstrap err", e); } finally { workerIoGroup.shutdownGracefully(); bossGroup.shutdownGracefully(); } }, "netty-start-thread"); startThread.setDaemon(true); startThread.start(); log.info("The NettyServerTransport already started"); } NettyServerTransport(int port, int workerIoThreads, int allIdleTimeSeconds); @Override void start(); @Override void shutdown();  }### Answer:
@Test public void testStart() throws InterruptedException { int port = 8888; int workerIoThreads = 4; int allIdleTimeSeconds = 60; JavaTransportProtocol transportCodec = new JavaTransportProtocol(); ReceiveMessageHandler<Request, Response> receiveMessageHandler = new NettyServerReceiveMessageHandlerTest(); NettyServerTransport<Response,Request> serverTransport = new NettyServerTransport<>(port,workerIoThreads, allIdleTimeSeconds); serverTransport.setTransportCodec(transportCodec); serverTransport.setReceiveMessageHandler(receiveMessageHandler); serverTransport.start(); System.out.println("netty服务端启动成功"); synchronized (NettyServerTransportTest.class) { NettyServerTransportTest.class.wait(); } }