@@ -0,0 +1,3392 @@
+package org.apache.dubbo.qos.server.handler;%0A%0Aimport io.netty.channel.ChannelFuture;%0Aimport io.netty.channel.ChannelFutureListener;%0Aimport io.netty.channel.ChannelHandlerContext;%0Aimport io.netty.handler.codec.http.FullHttpResponse;%0Aimport io.netty.handler.codec.http.HttpMethod;%0Aimport io.netty.handler.codec.http.HttpRequest;%0Aimport org.junit.Test;%0Aimport org.mockito.ArgumentCaptor;%0Aimport org.mockito.Mockito;%0A%0Aimport static org.hamcrest.Matchers.equalTo;%0Aimport static org.junit.Assert.assertThat;%0Aimport static org.mockito.ArgumentMatchers.any;%0Aimport static org.mockito.Mockito.mock;%0Aimport static org.mockito.Mockito.verify;%0Aimport static org.mockito.Mockito.when;%0A%0Apublic class HttpProcessHandlerTest %7B%0A    @Test%0A    public void test1() throws Exception %7B%0A        ChannelHandlerContext context = mock(ChannelHandlerContext.class);%0A        ChannelFuture future = mock(ChannelFuture.class);%0A        when(context.writeAndFlush(any(FullHttpResponse.class))).thenReturn(future);%0A        HttpRequest message = Mockito.mock(HttpRequest.class);%0A        when(message.getUri()).thenReturn(%22test%22);%0A        HttpProcessHandler handler = new HttpProcessHandler();%0A        handler.channelRead0(context, message);%0A        verify(future).addListener(ChannelFutureListener.CLOSE);%0A        ArgumentCaptor%3CFullHttpResponse%3E captor = ArgumentCaptor.forClass(FullHttpResponse.class);%0A        verify(context).writeAndFlush(captor.capture());%0A        FullHttpResponse response = captor.getValue();%0A        assertThat(response.getStatus().code(), equalTo(404));%0A    %7D%0A%0A    @Test%0A    public void test2() throws Exception %7B%0A        ChannelHandlerContext context = mock(ChannelHandlerContext.class);%0A        ChannelFuture future = mock(ChannelFuture.class);%0A        when(context.writeAndFlush(any(FullHttpResponse.class))).thenReturn(future);%0A        HttpRequest message = Mockito.mock(HttpRequest.class);%0A        when(message.getUri()).thenReturn(%22localhost:80/greeting%22);%0A        when(message.getMethod()).thenReturn(HttpMethod.GET);%0A        HttpProcessHandler handler = new HttpProcessHandler();%0A        handler.channelRead0(context, message);%0A        verify(future).addListener(ChannelFutureListener.CLOSE);%0A        ArgumentCaptor%3CFullHttpResponse%3E captor = ArgumentCaptor.forClass(FullHttpResponse.class);%0A        verify(context).writeAndFlush(captor.capture());%0A        FullHttpResponse response = captor.getValue();%0A        assertThat(response.getStatus().code(), equalTo(200));%0A    %7D%0A%0A    @Test%0A    public void test3() throws Exception %7B%0A        ChannelHandlerContext context = mock(ChannelHandlerContext.class);%0A        ChannelFuture future = mock(ChannelFuture.class);%0A        when(context.writeAndFlush(any(FullHttpResponse.class))).thenReturn(future);%0A        HttpRequest message = Mockito.mock(HttpRequest.class);%0A        when(message.getUri()).thenReturn(%22localhost:80/test%22);%0A        when(message.getMethod()).thenReturn(HttpMethod.GET);%0A        HttpProcessHandler handler = new HttpProcessHandler();%0A        handler.channelRead0(context, message);%0A        verify(future).addListener(ChannelFutureListener.CLOSE);%0A        ArgumentCaptor%3CFullHttpResponse%3E captor = ArgumentCaptor.forClass(FullHttpResponse.class);%0A        verify(context).writeAndFlush(captor.capture());%0A        FullHttpResponse response = captor.getValue();%0A        assertThat(response.getStatus().code(), equalTo(404));%0A    %7D%0A%7D%0A

Enhance the test coverage part-10 : dubbo-plugin module (#1993)