public static boolean isConsumer(URL url) {
        return url.getProtocol().equalsIgnoreCase(CONSUMER) || url.getPort() == 0;
    }
@Test
    public void testIsConsumer() {
        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 = "consumer://root:alibaba@127.0.0.1";
        URL url3 = UrlUtils.parseURL(address3, null);

        assertFalse(UrlUtils.isConsumer(url1));
        assertTrue(UrlUtils.isConsumer(url2));
        assertTrue(UrlUtils.isConsumer(url3));
    }