@Override
    public ExecuteContext doBefore(ExecuteContext context) {
        LogUtils.printHttpRequestBeforePoint(context);
        final InvokerService invokerService = PluginServiceManager.getPluginService(InvokerService.class);
        HttpHost httpHost = (HttpHost) context.getArguments()[0];
        final HttpRequest httpRequest = (HttpRequest) context.getArguments()[1];
        if (!PlugEffectWhiteBlackUtils.isHostEqualRealmName(httpHost.getHostName())) {
            return context;
        }
        final Map<String, String> hostAndPath = RequestInterceptorUtils.recoverUrl(httpRequest.getRequestLine()
                .getUri());
        if (hostAndPath.isEmpty()) {
            return context;
        }
        if (!PlugEffectWhiteBlackUtils.isPlugEffect(hostAndPath.get(HttpConstants.HTTP_URI_SERVICE))) {
            return context;
        }
        RequestInterceptorUtils.printRequestLog("HttpClient", hostAndPath);
        invokerService.invoke(
                        buildInvokerFunc(hostAndPath, httpRequest, context),
                        buildExFunc(httpRequest, Thread.currentThread().getContextClassLoader()),
                        hostAndPath.get(HttpConstants.HTTP_URI_SERVICE))
                .ifPresent(result -> this.setResultOrThrow(context, result,
                        hostAndPath.get(HttpConstants.HTTP_URI_PATH)));
        return context;
    }
@Test
    public void doBefore() throws Exception {
        final HttpClient4xInterceptor interceptor = new HttpClient4xInterceptor();
        interceptor.ready();
        final ExecuteContext context = buildContext();
        PlugEffectStrategyCache.INSTANCE.resolve(DynamicConfigEventType.CREATE, "");
        interceptor.doBefore(context);
        interceptor.onThrow(context);
        interceptor.after(context);
    }