@Override
    public void batchUnSubscribe(List<ConsumerConfig> configs) {
        for (ConsumerConfig config : configs) {
            unSubscribe(config);
        }
    }
@Test
    public void testBatchUnSubscribe() {
        ConsumerConfig<Object> config1 = new ConsumerConfig<>();
        String direct1 = "2";
        config1.setDirectUrl(direct1);

        ConsumerConfig<Object> config2 = new ConsumerConfig<>();
        String direct2 = "1";
        config2.setDirectUrl(direct2);

        domainRegistry.subscribe(config1);
        domainRegistry.subscribe(config2);

        assertTrue(domainRegistry.notifyListeners.containsKey(direct1));
        assertEquals(1, domainRegistry.notifyListeners.get(direct1).size());
        assertTrue(domainRegistry.notifyListeners.containsKey(direct2));
        assertEquals(1, domainRegistry.notifyListeners.get(direct2).size());


        List<ConsumerConfig> consumerConfigs = Arrays.asList(config1, config2);
        domainRegistry.batchUnSubscribe(consumerConfigs);
        assertTrue(domainRegistry.notifyListeners.containsKey(direct1));
        assertEquals(0, domainRegistry.notifyListeners.get(direct1).size());
        assertTrue(domainRegistry.notifyListeners.containsKey(direct2));
        assertEquals(0, domainRegistry.notifyListeners.get(direct2).size());

    }