@Override
    public ExecuteContext before(ExecuteContext context) {
        Object argument = context.getArguments()[0];
        if (argument instanceof InstanceInfo) {
            InstanceInfo instanceInfo = (InstanceInfo) argument;
            AppCache.INSTANCE.setAppName(instanceInfo.getAppName());
            SpringRouterUtils.putMetaData(instanceInfo.getMetadata(), routerConfig);
        }
        return context;
    }
@Test
    public void testBefore() {
        interceptor.before(context);

        // ek will capitalize the service name, so the expected value here is also capitalized
        Assert.assertEquals("FOO", AppCache.INSTANCE.getAppName());
        InstanceInfo instanceInfo = (InstanceInfo) context.getArguments()[0];
        Map<String, String> metadata = instanceInfo.getMetadata();
        Assert.assertEquals(routerConfig.getRouterVersion(), metadata.get("version"));
        Assert.assertEquals("bar1", metadata.get("bar"));
        Assert.assertEquals("foo2", metadata.get("foo"));
    }