public static List<URL> classifyUrls(List<URL> urls, Predicate<URL> predicate) {
        return urls.stream().filter(predicate).collect(Collectors.toList());
    }
@Test
    public void testClassifyUrls() {

        String address1 = "remote://root:alibaba@127.0.0.1:9090";
        URL url1 = UrlUtils.parseURL(address1, null);
        String address2 = "consumer://root:alibaba@127.0.0.1:9090";
        URL url2 = UrlUtils.parseURL(address2, null);
        String address3 = "remote://root:alibaba@127.0.0.1";
        URL url3 = UrlUtils.parseURL(address3, null);
        String address4 = "consumer://root:alibaba@127.0.0.1";
        URL url4 = UrlUtils.parseURL(address4, null);

        List<URL> urls = new ArrayList<>();
        urls.add(url1);
        urls.add(url2);
        urls.add(url3);
        urls.add(url4);

        List<URL> consumerUrls = UrlUtils.classifyUrls(urls, UrlUtils::isConsumer);
        assertEquals(2, consumerUrls.size());
        assertTrue(consumerUrls.contains(url2));
        assertTrue(consumerUrls.contains(url4));

        List<URL> nonConsumerUrls = UrlUtils.classifyUrls(urls, url -> !UrlUtils.isConsumer(url));
        assertEquals(2, nonConsumerUrls.size());
        assertTrue(nonConsumerUrls.contains(url1));
        assertTrue(nonConsumerUrls.contains(url3));
    }