@Override
    public ExecuteContext before(ExecuteContext context) {
        Object object = context.getObject();
        if (object instanceof BaseLoadBalancer) {
            List<Object> serverList = getServerList(context.getMethod().getName(), object);
            if (CollectionUtils.isEmpty(serverList)) {
                return context;
            }
            BaseLoadBalancer loadBalancer = (BaseLoadBalancer) object;
            String name = loadBalancer.getName();
            RequestData requestData = getRequestData().orElse(null);
            List<Object> targetInstances = loadBalancerService.getTargetInstances(name, serverList, requestData);
            context.skip(Collections.unmodifiableList(targetInstances));
        }
        return context;
    }
@Test
    public void testBeforeWithRequestContext() {
        RequestContext requestContext = RequestContext.getCurrentContext();
        MockHttpServletRequest request = new MockHttpServletRequest();
        request.addHeader("bar", "bar1");
        request.addHeader("foo", "foo1");
        request.addHeader("foo2", "foo2");
        requestContext.setRequest(request);
        interceptor.before(context);
        BaseLoadBalancer loadBalancer = (BaseLoadBalancer) context.getObject();
        List<Server> servers = loadBalancer.getAllServers();
        Assert.assertNotNull(servers);
        Assert.assertEquals(1, servers.size());
        Assert.assertEquals("foo", servers.get(0).getHost());
        Assert.assertEquals(8081, servers.get(0).getPort());
    }