@GetMapping("/watcherConfigs")
    public SampleResult getSubClientConfigByIp(HttpServletRequest request, HttpServletResponse response,
            @RequestParam("ip") String ip, ModelMap modelMap) {
        
        SampleResult result = longPollingService.getCollectSubscribleInfoByIp(ip);
        List<Connection> connectionsByIp = connectionManager.getConnectionByIp(ip);
        for (Connection connectionByIp : connectionsByIp) {
            Map<String, String> listenKeys = configChangeListenContext
                    .getListenKeys(connectionByIp.getMetaInfo().getConnectionId());
            if (listenKeys != null) {
                result.getLisentersGroupkeyStatus().putAll(listenKeys);
            }
        }
        return result;
        
    }
@Test
    void testGetSubClientConfigByIp() throws Exception {
        
        String ip = "127.0.0.1";
        SampleResult result = new SampleResult();
        result.setLisentersGroupkeyStatus(new HashMap<>());
        when(longPollingService.getCollectSubscribleInfoByIp(ip)).thenReturn(result);
        ConnectionMeta connectionMeta = new ConnectionMeta(ip, ip, ip, 8888, 9848, "GRPC", "", "", new HashMap<>());
        Connection connection = new GrpcConnection(connectionMeta, null, null);
        List<Connection> connectionList = new ArrayList<>();
        connectionList.add(connection);
        when(connectionManager.getConnectionByIp(ip)).thenReturn(connectionList);
        Map<String, String> map = new HashMap<>();
        map.put("test", "test");
        when(configChangeListenContext.getListenKeys(ip)).thenReturn(map);
        
        MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.COMMUNICATION_CONTROLLER_PATH + "/watcherConfigs")
                .param("ip", ip);
        String actualValue = mockMvc.perform(builder).andReturn().getResponse().getContentAsString();
        assertEquals("{\"test\":\"test\"}", JacksonUtils.toObj(actualValue).get("lisentersGroupkeyStatus").toString());
        
    }