@Override
    protected ExecuteContext doBefore(ExecuteContext context) throws Exception {
        LogUtils.printHttpRequestBeforePoint(context);
        final InvokerService invokerService = PluginServiceManager.getPluginService(InvokerService.class);
        final Optional<Request> rawRequest = getRequest(context);
        if (!rawRequest.isPresent()) {
            return context;
        }
        Request request = rawRequest.get();
        URI uri = request.url().uri();
        if (!PlugEffectWhiteBlackUtils.isHostEqualRealmName(uri.getHost())) {
            return context;
        }
        Map<String, String> hostAndPath = RequestInterceptorUtils.recoverHostAndPath(uri.getPath());
        if (!PlugEffectWhiteBlackUtils.isPlugEffect(hostAndPath.get(HttpConstants.HTTP_URI_SERVICE))) {
            return context;
        }
        RequestInterceptorUtils.printRequestLog("OkHttp3", hostAndPath);
        AtomicReference<Request> rebuildRequest = new AtomicReference<>();
        rebuildRequest.set(request);
        invokerService.invoke(
                buildInvokerFunc(uri, hostAndPath, request, rebuildRequest, context),
                buildExFunc(rebuildRequest),
                hostAndPath.get(HttpConstants.HTTP_URI_SERVICE))
                .ifPresent(object -> setResultOrThrow(context, object, uri.getPath()));
        return context;
    }
@Test
    public void testRestTemplateInterceptor() throws Exception {
        Optional<?> configMapOptional = ReflectUtils.getStaticFieldValue(ConfigManager.class, "CONFIG_MAP");
        DiscoveryPluginConfig discoveryPluginConfig = new DiscoveryPluginConfig();
        if (configMapOptional.isPresent()) {
            Map<String, BaseConfig> configMap = (Map<String, BaseConfig>) configMapOptional.get();
            configMap.put(DiscoveryPluginConfig.class.getAnnotation(ConfigTypeKey.class).value(),
                    discoveryPluginConfig);
        }
        OkHttpClient client = new OkHttpClient();
        Request request = createRequest(url);
        ExecuteContext context = ExecuteContext.forMemberMethod(client.newCall(request),
                String.class.getDeclaredMethod("trim"), arguments, null,
                null);
        discoveryPluginConfig.setRealmName(realmName);
        initStrategy(PlugEffectWhiteBlackConstants.STRATEGY_ALL, "zookeeper-provider-demo");
        interceptor.doBefore(context);
        Request requestNew = (Request)context.getRawMemberFieldValue("originalRequest");
        Assert.assertEquals(url, requestNew.url().uri().toString());
    }