@Test
    public void testIsDomain() {
        assertTrue(isDomain("bolt://alipay.com:80?a=b"));
        assertTrue(isDomain("alipay.com:80?a=b"));
        assertTrue(isDomain("bolt://alipay.com:80"));
        assertTrue(isDomain("alipay.com:80"));
        assertTrue(isDomain("bolt://alipay?a=b"));
        assertTrue(isDomain("alipay"));
        assertTrue(isDomain("sofagw-pool"));

        assertFalse(isDomain("bolt://1.1.1.1:80?a=b"));
        assertFalse(isDomain("1.1.1.1:80?a=b"));
        assertFalse(isDomain("bolt://1.1.1.1:80"));
        assertFalse(isDomain("1.1.1.1:80"));
        assertFalse(isDomain("1.1.1.1"));

        //todo now we do not support ipv6
        //        assertFalse(isDomain("bolt://FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF#12200?a=b"));
        //        assertFalse(isDomain("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF#12200?a=b"));
        //        assertFalse(isDomain("bolt://FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF#12200"));
        //        assertFalse(isDomain("bolt://FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF?a=b"));
        //        assertFalse(isDomain("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF"));
    }
@author <a href=mailto:orezsilence@163.com>zhangchengxi</a>
registry/registry-local/src/test/java/com/alipay/sofa/rpc/registry/local/DomainRegistryHelperTest.java