@Override
    public ExecuteContext before(ExecuteContext context) {
        Object object = context.getObject();
        String serviceId = getServiceId(object).orElse(null);
        if (StringUtils.isBlank(serviceId)) {
            return context;
        }
        Object[] arguments = context.getArguments();
        List<Object> instances = (List<Object>) arguments[0];
        if (CollectionUtils.isEmpty(instances)) {
            return context;
        }
        RequestData requestData = ThreadLocalUtils.getRequestData();
        List<Object> targetInstances = loadBalancerService.getTargetInstances(serviceId, instances, requestData);
        arguments[0] = targetInstances;
        return context;
    }
@Test
    public void testBefore() {
        ThreadLocalUtils.setRequestData(new RequestData(Collections.emptyMap(), "", ""));
        interceptor.before(context);
        List<ServiceInstance> instances = (List<ServiceInstance>) context.getArguments()[0];
        Assert.assertNotNull(instances);
        Assert.assertEquals(1, instances.size());
    }