@Override
    protected ExecuteContext doBefore(ExecuteContext context) throws Exception {
        LogUtils.printHttpRequestBeforePoint(context);
        final InvokerService invokerService = PluginServiceManager.getPluginService(InvokerService.class);
        URI uri = (URI) context.getArguments()[0];
        HttpMethod httpMethod = (HttpMethod) context.getArguments()[1];
        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("restTemplate", hostAndPath);
        Optional<Object> result = invokerService.invoke(
                buildInvokerFunc(uri, hostAndPath, context, httpMethod),
                ex -> ex,
                hostAndPath.get(HttpConstants.HTTP_URI_SERVICE));
        if (result.isPresent()) {
            Object obj = result.get();
            if (obj instanceof Exception) {
                LOGGER.log(Level.SEVERE, "request is error, uri is " + uri, (Exception) obj);
                context.setThrowableOut((Exception) obj);
                return context;
            }
            context.skip(obj);
        }
        return context;
    }
@Test
    public void testRestTemplateInterceptor() throws Exception {
        ExecuteContext context = ExecuteContext.forMemberMethod(new Object(), null, arguments, null, null);
        URI uri = createURI(url);
        arguments[0] = uri;
        arguments[1] = HttpMethod.GET;

        //Contains domain names, sets multiple domain names, and does not set blacklist or whitelist
        discoveryPluginConfig.setRealmName(realmNames);
        interceptor.doBefore(context);
        URI uriNew = (URI) context.getArguments()[0];
        Assert.assertEquals(url, uriNew.toString());

        discoveryPluginConfig.setRealmName(realmName);
        //Contains domain names, and sets all through policies
        initStrategy(PlugEffectWhiteBlackConstants.STRATEGY_ALL, "zookeeper-provider-demo");
        Mockito.when(invokerService.invoke(null, null, "zookeeper-provider-demo"))
            .thenReturn(Optional.ofNullable(new Object()));
        interceptor.doBefore(context);
        uriNew = (URI) context.getArguments()[0];
        Assert.assertEquals(url, uriNew.toString());
    }