@Override
    protected ExecuteContext doBefore(ExecuteContext context) throws Exception {
        LogUtils.printHttpRequestBeforePoint(context);
        final InvokerService invokerService = PluginServiceManager.getPluginService(InvokerService.class);
        Request request = (Request) context.getArguments()[0];
        Map<String, String> urlInfo = RequestInterceptorUtils.recoverUrl(request.url());
        if (!PlugEffectWhiteBlackUtils.isAllowRun(urlInfo.get(HttpConstants.HTTP_URI_HOST),
                urlInfo.get(HttpConstants.HTTP_URI_SERVICE))) {
            return context;
        }
        RequestInterceptorUtils.printRequestLog("feign", urlInfo);
        Optional<Object> result = invokerService.invoke(
                buildInvokerFunc(context, request, urlInfo),
                ex -> ex,
                urlInfo.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 " + request.url(), (Exception) obj);
                context.setThrowableOut((Exception) obj);
                return context;
            }
            context.skip(obj);
        }
        return context;
    }
@Test
    public void testFeignInvokeInterceptor() throws Exception {
        ExecuteContext context = ExecuteContext.forMemberMethod(new Object(), null, arguments, null, null);
        Request request = createRequest(HttpMethod.GET, url);
        arguments[0] = request;

        // No domain name is configured in the environment
        interceptor.doBefore(context);
        Request temp = (Request) context.getArguments()[0];
        Assert.assertEquals(url, temp.url());

        // Contains domain names, sets a single domain name, and does not set a blacklist or whitelist
        discoveryPluginConfig.setRealmName(realmName);
        interceptor.doBefore(context);
        temp = (Request) context.getArguments()[0];
        Assert.assertEquals(url, temp.url());

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

        // Contains domain names, and sets all do not pass the policy
        initStrategy(PlugEffectWhiteBlackConstants.STRATEGY_NONE, "");
        interceptor.doBefore(context);
        temp = (Request) context.getArguments()[0];
        Assert.assertEquals(url, temp.url());

        // Contains domain names, and sets the blacklist to include the corresponding service name
        initStrategy(PlugEffectWhiteBlackConstants.STRATEGY_BLACK, "zookeeper-provider-demo");
        interceptor.doBefore(context);
        temp = (Request) context.getArguments()[0];
        Assert.assertEquals(url, temp.url());

        // Contains domain names, and the blacklist does not contain the corresponding service name
        initStrategy(PlugEffectWhiteBlackConstants.STRATEGY_BLACK, "service1");
        Mockito.when(invokerService.invoke(null, null, "zookeeper-provider-demo"))
                .thenReturn(Optional.ofNullable(new Object()));
        interceptor.doBefore(context);
        temp = (Request) context.getArguments()[0];
        Assert.assertEquals(url, temp.url());

        // Contains the domain name, and sets the whitelist to include the corresponding service name
        initStrategy(PlugEffectWhiteBlackConstants.STRATEGY_WHITE, "zookeeper-provider-demo");
        Mockito.when(invokerService.invoke(null, null, "zookeeper-provider-demo"))
                .thenReturn(Optional.ofNullable(new Object()));
        interceptor.doBefore(context);
        temp = (Request) context.getArguments()[0];
        Assert.assertEquals(url, temp.url());

        // If the domain name is included, the whitelist does not contain the corresponding service name
        initStrategy(PlugEffectWhiteBlackConstants.STRATEGY_WHITE, "service1");
        interceptor.doBefore(context);
        temp = (Request) context.getArguments()[0];
        Assert.assertEquals(url, temp.url());

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