@Override
    public ExecuteContext doBefore(ExecuteContext context) {
        final Object object = context.getObject();
        if (!(object instanceof DynamicServerListLoadBalancer)) {
            return context;
        }
        DynamicServerListLoadBalancer<Server> serverListLoadBalancer = (DynamicServerListLoadBalancer<Server>) object;
        final RegisterCenterService service = PluginServiceManager.getPluginService(RegisterCenterService.class);
        final List<MicroServiceInstance> serverList = service.getServerList(serverListLoadBalancer.getName());
        final List<Server> mergeServerList = convertAndMerge(serverListLoadBalancer, serverList);
        ReflectUtils.invokeMethod(object, "updateAllServerList", new Class[]{List.class},
                new Object[]{mergeServerList});
        context.skip(true);
        return context;
    }
@Test
    public void doBefore() throws NoSuchMethodException {
        RegisterDynamicConfig.INSTANCE.setClose(false);
        RegisterContext.INSTANCE.setAvailable(true);
        final ExecuteContext context = interceptor.doBefore(buildContext(serverListLoadBalancer, null));
        Assert.assertTrue(context.isSkip());
        Mockito.verify(serverList, Mockito.times(1)).getUpdatedListOfServers();
        RegisterContext.INSTANCE.setAvailable(false);
        RegisterDynamicConfig.INSTANCE.setClose(true);
    }