@GetMapping(value = ApiConstants.PROMETHEUS_CONTROLLER_NAMESPACE_PATH, produces = "application/json; charset=UTF-8")
    public ResponseEntity<String> metricNamespace(@PathVariable("namespaceId") String namespaceId)
            throws NacosException {
        ArrayNode arrayNode = getServiceArrayNode(namespaceId, s -> true);
        
        return ResponseEntity.ok().body(arrayNode.toString());
    }
@Test
    public void testMetricNamespace() throws Exception {
        when(instanceServiceV2.listAllInstances(nameSpace, NamingUtils.getGroupedName(name, group))).thenReturn(testInstanceList);
        String prometheusNamespacePath = ApiConstants.PROMETHEUS_CONTROLLER_NAMESPACE_PATH.replace("{namespaceId}", nameSpace);
        MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(prometheusNamespacePath);
        MockHttpServletResponse response = mockMvc.perform(builder).andReturn().getResponse();
        assertEquals(200, response.getStatus());
        assertEquals(testInstanceList.size(), JacksonUtils.toObj(response.getContentAsString()).size());
    }