public static boolean isRegistry(URL url) {
        return REGISTRY_PROTOCOL.equals(url.getProtocol())
                || SERVICE_REGISTRY_PROTOCOL.equalsIgnoreCase(url.getProtocol())
                || (url.getProtocol() != null && url.getProtocol().endsWith("-registry-protocol"));
    }
@Test
    public void testIsRegistry() {
        String address1 = "http://example.com";
        URL url1 = UrlUtils.parseURL(address1, null);
        String address2 = "registry://example.com";
        URL url2 = UrlUtils.parseURL(address2, null);
        String address3 = "sr://example.com";
        URL url3 = UrlUtils.parseURL(address3, null);
        String address4 = "custom-registry-protocol://example.com";
        URL url4 = UrlUtils.parseURL(address4, null);

        assertFalse(UrlUtils.isRegistry(url1));
        assertTrue(UrlUtils.isRegistry(url2));
        assertFalse(UrlUtils.isRegistry(url3));
        assertTrue(UrlUtils.isRegistry(url4));
    }