source: class NacosConfigEndpoint implements ApplicationListener<NacosConfigMetadataEvent> {
  
  	@ReadOperation
  	public Map<String, Object> invoke() {
  		Map<String, Object> result = new HashMap<>(8);
  
  		if (!(ClassUtils.isAssignable(applicationContext.getEnvironment().getClass(),
  				ConfigurableEnvironment.class))) {
  			result.put("error", "environment type not match ConfigurableEnvironment: "
  					+ applicationContext.getEnvironment().getClass().getName());
  		}
  		else {
  
  			result.put("nacosConfigMetadata", nacosConfigMetadataMap.values());
  
  			result.put("nacosConfigGlobalProperties",
  					PropertiesUtils.extractSafeProperties(applicationContext.getBean(
  							CONFIG_GLOBAL_NACOS_PROPERTIES_BEAN_NAME, Properties.class)));
  		}
  
  		return result;
  	}
  
  	@Override public void onApplicationEvent(NacosConfigMetadataEvent event);
  	private String buildMetadataKey(NacosConfigMetadataEvent event);
  
  	@Autowired
  	private NacosConfigEndpoint nacosConfigEndpoint;
  
  }
  
  class NacosConfigEndpointTest {
  
  	@Autowired
  	private NacosConfigEndpoint nacosConfigEndpoint;
  
  	@Test
  	public void testInvoke() {
  
target: 		Map<String, Object> metadata = nacosConfigEndpoint.invoke();
  		Assert.assertNotNull(metadata.get("nacosConfigMetadata"));
  	}
  
  }