@Override
    public ExecuteContext before(ExecuteContext context) {
        Object[] arguments = context.getArguments();
        if (arguments != null && arguments.length > 0) {
            Object obj = arguments[0];
            Object serviceName = ReflectUtils.getFieldValue(obj, "serviceName").orElse(null);
            if (serviceName instanceof String) {
                AppCache.INSTANCE.setAppName((String) serviceName);
            } else {
                LOGGER.warning("Service name is null or not instanceof string.");
            }
            SpringRouterUtils.putMetaData(SpringRouterUtils.getMetadata(obj), routerConfig);
        }
        return context;
    }
@Test
    public void testBefore() {
        interceptor.before(context);
        Assert.assertEquals("foo", AppCache.INSTANCE.getAppName());
        Map<String, String> metadata = ((TestObject) context.getArguments()[0]).getMetadata();
        Assert.assertEquals("bar1", metadata.get("bar"));
        Assert.assertEquals("foo1", metadata.get("foo"));
        Assert.assertEquals(routerConfig.getRouterVersion(), metadata.get("version"));

        context.getArguments()[0] = new TestObject(null);
        interceptor.before(context);
        Assert.assertEquals("foo", AppCache.INSTANCE.getAppName());
    }