@Override
    public Map<String, String> apply(Object obj) {
        return SpringRouterUtils.getMetadata(ReflectUtils.invokeWithNoneParameter(obj, "getInstanceInfo"));
    }
@Test
    public void testApply() {
        Map<String, String> map = Collections.singletonMap("foo", "bar");
        InstanceInfo instanceInfo = Builder.newBuilder().setAppName("APP").setMetadata(map).build();
        DiscoveryEnabledServer server = new DiscoveryEnabledServer(instanceInfo, false);
        EurekaMetadataMapper mapper = new EurekaMetadataMapper();
        Map<String, String> metadata = mapper.apply(server);
        Assert.assertNotNull(metadata);
        Assert.assertEquals("bar", metadata.get("foo"));
    }