protected void notify(List<URL> urls) {
        if (CollectionUtils.isEmpty(urls)) {
            return;
        }

        for (Map.Entry<URL, Set<NotifyListener>> entry : getSubscribed().entrySet()) {
            URL url = entry.getKey();

            if (!UrlUtils.isMatch(url, urls.get(0))) {
                continue;
            }

            Set<NotifyListener> listeners = entry.getValue();
            if (listeners != null) {
                for (NotifyListener listener : listeners) {
                    try {
                        notify(url, listener, filterEmpty(url, urls));
                    } catch (Throwable t) {
                        // 1-7: Failed to notify registry event.
                        logger.error(
                                REGISTRY_FAILED_NOTIFY_EVENT,
                                "consumer is offline",
                                "",
                                "Failed to notify registry event, urls: " + urls + ", cause: " + t.getMessage(),
                                t);
                    }
                }
            }
        }
    }
@Test
    void testNotifyArgs() {
        // check parameters
        try {
            abstractRegistry.notify(null, null, null);
            Assertions.fail();
        } catch (Exception e) {
            Assertions.assertTrue(e instanceof IllegalArgumentException);
        }
        // check parameters
        try {
            abstractRegistry.notify(testUrl, null, null);
            Assertions.fail();
        } catch (Exception e) {
            Assertions.assertTrue(e instanceof IllegalArgumentException);
        }
        // check parameters
        try {
            abstractRegistry.notify(null, listener, null);
            Assertions.fail();
        } catch (Exception e) {
            Assertions.assertTrue(e instanceof IllegalArgumentException);
        }

        Assertions.assertFalse(notifySuccess);
        abstractRegistry.notify(testUrl, listener, null);
        Assertions.assertFalse(notifySuccess);

        List<URL> urls = new ArrayList<>();
        urls.add(testUrl);
        // check if notify successfully
        Assertions.assertFalse(notifySuccess);
        abstractRegistry.notify(testUrl, listener, urls);
        Assertions.assertTrue(notifySuccess);
    }