@Test
    public void testGetDomain() {
        assertEquals("alipay.com", getDomain("bolt://alipay.com:80?a=b"));
        assertEquals("alipay.com", getDomain("alipay.com:80?a=b"));
        assertEquals("alipay.com", getDomain("bolt://alipay.com:80"));
        assertEquals("alipay.com", getDomain("alipay.com:80"));
        assertEquals("alipay", getDomain("bolt://alipay?a=b"));
        assertEquals("alipay", getDomain("alipay"));
        assertEquals("sofagw-pool", getDomain("sofagw-pool"));

        assertEquals("1.1.1.1", getDomain("bolt://1.1.1.1:80?a=b"));
        assertEquals("1.1.1.1", getDomain("1.1.1.1:80?a=b"));
        assertEquals("1.1.1.1", getDomain("bolt://1.1.1.1:80"));
        assertEquals("1.1.1.1", getDomain("1.1.1.1:80"));
        assertEquals("1.1.1.1", getDomain("1.1.1.1"));
    }
@author <a href=mailto:orezsilence@163.com>zhangchengxi</a>
registry/registry-local/src/test/java/com/alipay/sofa/rpc/registry/local/DomainRegistryHelperTest.java