@Override
    protected ExecuteContext doBefore(ExecuteContext context) {
        LogUtils.printHttpRequestBeforePoint(context);
        Request request = (Request) context.getObject();
        if (LOGGER.isLoggable(Level.FINE)) {
            LOGGER.log(Level.FINE, "Request''s classloader is {0}, jettyClientWrapper''s classloader is {1}.",
                    new Object[]{Request.class.getClassLoader().getClass().getName(),
                            JettyClientWrapper.class.getClassLoader().getClass().getName()});
        }
        if (!(request instanceof JettyClientWrapper)) {
            return context;
        }
        String url = request.getScheme() + HttpConstants.HTTP_URL_DOUBLE_SLASH + request.getHost() + request.getPath();
        Map<String, String> urlInfo = RequestInterceptorUtils.recoverUrl(url);
        RequestInterceptorUtils.printRequestLog("webClient(jetty)", urlInfo);
        Optional<Object> result = invokerService.invoke(
                invokerContext -> buildInvokerFunc(context, invokerContext, request,
                        urlInfo.get(HttpConstants.HTTP_URI_PATH)),
                ex -> ex,
                urlInfo.get(HttpConstants.HTTP_URI_SERVICE));
        if (result.isPresent()) {
            Object obj = result.get();
            if (obj instanceof Exception) {
                LOGGER.log(Level.SEVERE, "Webclient(jetty) request is error, url is " + url, (Exception) obj);
                context.setThrowableOut((Exception) obj);
                return context;
            }
        }

        // The method returns void
        context.skip(null);
        return context;
    }
@Test
    public void testException() {
        // Test for anomalies
        JettyClientWrapper wrapper = Mockito.spy(new JettyClientWrapper(Mockito.mock(HttpClient.class),
                new HttpConversation(), HELLO_URI));
        ReflectUtils.setFieldValue(wrapper, HttpConstants.HTTP_URI_HOST, "www.domain.com");
        ExecuteContext context = ExecuteContext.forMemberMethod(wrapper, method, arguments, null, null);
        Mockito.doThrow(new RuntimeException()).when(wrapper).send(Mockito.isA(CompleteListener.class));
        interceptor.doBefore(context);
        Assert.assertEquals(RuntimeException.class, context.getThrowableOut().getClass());
    }