@Secured(resource = Commons.NACOS_CORE_CONTEXT_V2 + "/loader", action = ActionTypes.READ)
    @GetMapping("/cluster")
    public ResponseEntity<Map<String, Object>> loaderMetrics() {
        
        Map<String, Object> serverLoadMetrics = getServerLoadMetrics();
        
        return ResponseEntity.ok().body(serverLoadMetrics);
    }
@Test
    void testLoaderMetrics() throws NacosException {
        EnvUtil.setEnvironment(new MockEnvironment());
        Member member = new Member();
        member.setIp("1.1.1.1");
        member.setPort(8848);
        ServerAbilities serverAbilities = new ServerAbilities();
        ServerRemoteAbility serverRemoteAbility = new ServerRemoteAbility();
        serverRemoteAbility.setSupportRemoteConnection(true);
        serverAbilities.setRemoteAbility(serverRemoteAbility);
        member.setAbilities(serverAbilities);
        Mockito.when(serverMemberManager.allMembersWithoutSelf()).thenReturn(Collections.singletonList(member));
        
        Map<String, String> metrics = new HashMap<>();
        metrics.put("conCount", "1");
        ServerLoaderInfoResponse serverLoaderInfoResponse = new ServerLoaderInfoResponse();
        serverLoaderInfoResponse.setLoaderMetrics(metrics);
        Mockito.when(serverLoaderInfoRequestHandler.handle(Mockito.any(), Mockito.any())).thenReturn(serverLoaderInfoResponse);
        
        Mockito.when(serverMemberManager.getSelf()).thenReturn(member);
        
        ResponseEntity<Map<String, Object>> result = serverLoaderController.loaderMetrics();
        assertEquals(9, result.getBody().size());
    }