@Override
    public Map<String, String> apply(Object obj) {
        Object url = DubboReflectUtils.getUrl(obj);
        Object instance = DubboReflectUtils.getInstance(url);
        Map<String, String> params = new HashMap<>();
        if (instance != null && ((ServiceInstance) instance).getAllParams() != null) {
            params.putAll(((ServiceInstance) instance).getAllParams());
        }
        Object metadataInfo = DubboReflectUtils.getMetadataInfo(url);
        String serviceKey = (String) DubboReflectUtils.getProtocolServiceKey(url);
        if (metadataInfo != null && !StringUtils.isEmpty(serviceKey)) {
            params.putAll(((MetadataInfo) metadataInfo).getParameters(serviceKey));
        }
        return params;
    }
@Test
    public void testApply() {
        Invoker invoker = new Invoker() {
            @Override
            public Class getInterface() {
                return null;
            }

            @Override
            public Result invoke(Invocation invocation) throws RpcException {
                return null;
            }

            @Override
            public URL getUrl() {
                return instanceAddressURL;
            }

            @Override
            public boolean isAvailable() {
                return false;
            }

            @Override
            public void destroy() {

            }
        };
        Dubbo3InstanceMapper mapper = new Dubbo3InstanceMapper();
        Map<String, String> queryMap = mapper.apply(invoker);
        Assert.assertEquals(4, queryMap.size());
    }