@Override
                public List<ChannelHandler> frontChannelHandlers() {
                    ChannelHandler channelHandler = new ChannelInboundHandler() {
                        @Override
                        public void channelRegistered(ChannelHandlerContext ctx) throws Exception {

                        }

                        @Override
                        public void channelUnregistered(ChannelHandlerContext ctx) throws Exception {

                        }

                        @Override
                        public void channelActive(ChannelHandlerContext ctx) throws Exception {

                        }

                        @Override
                        public void channelInactive(ChannelHandlerContext ctx) throws Exception {

                        }

                        @Override
                        public void channelRead(ChannelHandlerContext ctx, Object msg)
                                                                                      throws Exception {
                            serverPreHandlerResult[0] = true;
                            ctx.fireChannelRead(msg);
                        }

                        @Override
                        public void channelReadComplete(ChannelHandlerContext ctx) throws Exception {

                        }

                        @Override
                        public void userEventTriggered(ChannelHandlerContext ctx, Object evt)
                                                                                             throws Exception {

                        }

                        @Override
                        public void channelWritabilityChanged(ChannelHandlerContext ctx)
                                                                                        throws Exception {

                        }

                        @Override
                        public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause)
                                                                                               throws Exception {

                        }

                        @Override
                        public void handlerAdded(ChannelHandlerContext ctx) throws Exception {

                        }

                        @Override
                        public void handlerRemoved(ChannelHandlerContext ctx) throws Exception {

                        }
                    };
                    return Collections.singletonList(channelHandler);
                }
@author chengyi (mark.lx@antfin.com) 2021-07-19 17:21
src/test/java/com/alipay/remoting/rpc/prehandle/ExtendHandlerTest.java