@Override
    public void unregister(URL url) {
        if (url == null) {
            throw new IllegalArgumentException("unregister url == null");
        }
        if (url.getPort() != 0) {
            if (logger.isInfoEnabled()) {
                logger.info("Unregister: " + url);
            }
        }
        registered.remove(url);
    }
@Test
    void testUnregister() {
        // test one unregister
        URL url = new ServiceConfigURL("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()));
    }