@Override
    public Registry getRegistry(URL url) {
        return new ListenerRegistryWrapper(
                registryFactory.getRegistry(url),
                Collections.unmodifiableList(url.getOrDefaultApplicationModel()
                        .getExtensionLoader(RegistryServiceListener.class)
                        .getActivateExtension(url, "registry.listeners")));
    }
@Test
    void test() throws Exception {
        RegistryServiceListener listener1 = Mockito.mock(RegistryServiceListener.class);
        RegistryServiceListener1.delegate = listener1;
        RegistryServiceListener listener2 = Mockito.mock(RegistryServiceListener.class);
        RegistryServiceListener2.delegate = listener2;

        Registry registry = registryFactory.getRegistry(
                URL.valueOf("simple://localhost:8080/registry-service?registry.listeners=listener-one,listener-two"));
        URL url = URL.valueOf("dubbo://localhost:8081/simple.service");
        registry.register(url);

        Mockito.verify(listener1, Mockito.times(1)).onRegister(url, SimpleRegistryFactory.registry);
        Mockito.verify(listener2, Mockito.times(1)).onRegister(url, SimpleRegistryFactory.registry);

        registry.unregister(url);
        Mockito.verify(listener1, Mockito.times(1)).onUnregister(url, SimpleRegistryFactory.registry);
        Mockito.verify(listener2, Mockito.times(1)).onUnregister(url, SimpleRegistryFactory.registry);

        registry.subscribe(url, Mockito.mock(NotifyListener.class));
        Mockito.verify(listener1, Mockito.times(1)).onSubscribe(url, SimpleRegistryFactory.registry);
        Mockito.verify(listener2, Mockito.times(1)).onSubscribe(url, SimpleRegistryFactory.registry);

        registry.unsubscribe(url, Mockito.mock(NotifyListener.class));
        Mockito.verify(listener1, Mockito.times(1)).onUnsubscribe(url, SimpleRegistryFactory.registry);
        Mockito.verify(listener2, Mockito.times(1)).onUnsubscribe(url, SimpleRegistryFactory.registry);
    }