public void registerListener(String groupName, String serviceName, NamingSelectorWrapper wrapper) {
        if (wrapper == null) {
            return;
        }
        String subId = NamingUtils.getGroupedName(serviceName, groupName);
        selectorManager.addSelectorWrapper(subId, wrapper);
    }
@Test
    void testRegisterListener() {
        List<String> clusters = Collections.singletonList(CLUSTER_STR_CASE);
        EventListener listener = Mockito.mock(EventListener.class);
        NamingSelector selector = NamingSelectorFactory.newClusterSelector(clusters);
        NamingSelectorWrapper wrapper = new NamingSelectorWrapper(SERVICE_NAME_CASE, GROUP_CASE, CLUSTER_STR_CASE,
                selector, listener);
        instancesChangeNotifier.registerListener(GROUP_CASE, SERVICE_NAME_CASE, wrapper);
        List<ServiceInfo> subscribeServices = instancesChangeNotifier.getSubscribeServices();
        assertEquals(1, subscribeServices.size());
        assertEquals(GROUP_CASE, subscribeServices.get(0).getGroupName());
        assertEquals(SERVICE_NAME_CASE, subscribeServices.get(0).getName());
        assertNull(subscribeServices.get(0).getClusters());
        
        List<Instance> hosts = new ArrayList<>();
        Instance ins = new Instance();
        hosts.add(ins);
        InstancesDiff diff = new InstancesDiff();
        diff.setAddedInstances(hosts);
        InstancesChangeEvent event = new InstancesChangeEvent(EVENT_SCOPE_CASE, SERVICE_NAME_CASE, GROUP_CASE,
                CLUSTER_STR_CASE, hosts, diff);
        assertTrue(instancesChangeNotifier.scopeMatches(event));
    }