@Test
public void testUnregister() throws Exception {

    //test one unregister
    URL url = new URL("dubbo", "192.168.0.1", 2200);
    abstractRegistry.register(url);
    abstractRegistry.unregister(url);
    MatcherAssert.assertThat(false, Matchers.equalTo(abstractRegistry.getRegistered().contains(url)));
    //test multiple unregisters
    for (URL u : abstractRegistry.getRegistered()) {
        abstractRegistry.unregister(u);
    }
    List<URL> urlList = getList();
    for (URL urlSub : urlList) {
        abstractRegistry.register(urlSub);
    }
    for (URL urlSub : urlList) {
        abstractRegistry.unregister(urlSub);
    }
    MatcherAssert.assertThat(0, Matchers.equalTo(abstractRegistry.getRegistered().size()));
}