@Test
    public void testDestroy() {
        domainRegistry.init();
        ConsumerConfig<Object> config1 = new ConsumerConfig<>();
        String direct1 = "2";
        config1.setDirectUrl(direct1);
        domainRegistry.subscribe(config1);

        assertTrue(domainRegistry.scheduledExecutorService.isStarted());
        assertTrue(domainRegistry.notifyListeners.containsKey(direct1));
        domainRegistry.destroy();
        assertFalse(domainRegistry.scheduledExecutorService.isStarted());
        assertEquals(0, domainRegistry.notifyListeners.size());
    }
@author <a href=mailto:orezsilence@163.com>zhangchengxi</a>
registry/registry-local/src/test/java/com/alipay/sofa/rpc/registry/local/DomainRegistryTest.java