@Override
    public void onEvent(InstancesChangeEvent event) {
        String subId = NamingUtils.getGroupedName(event.getServiceName(), event.getGroupName());
        Collection<NamingSelectorWrapper> selectorWrappers = selectorManager.getSelectorWrappers(subId);
        for (NamingSelectorWrapper selectorWrapper : selectorWrappers) {
            selectorWrapper.notifyListener(event);
        }
    }
@Test
    void testOnEvent() {
        List<String> clusters = Collections.singletonList(CLUSTER_STR_CASE);
        NamingSelector selector = NamingSelectorFactory.newClusterSelector(clusters);
        EventListener listener = Mockito.mock(EventListener.class);
        
        NamingSelectorWrapper wrapper = new NamingSelectorWrapper(SERVICE_NAME_CASE, GROUP_CASE, CLUSTER_STR_CASE,
                selector, listener);
        instancesChangeNotifier.registerListener(GROUP_CASE, SERVICE_NAME_CASE, wrapper);
        Instance instance = new Instance();
        InstancesDiff diff = new InstancesDiff(null, Collections.singletonList(instance), null);
        instance.setClusterName(CLUSTER_STR_CASE);
        InstancesChangeEvent event1 = new InstancesChangeEvent(null, SERVICE_NAME_CASE, GROUP_CASE, CLUSTER_STR_CASE,
                Collections.emptyList(), diff);
        instancesChangeNotifier.onEvent(event1);
        Mockito.verify(listener, times(1)).onEvent(any());
    }