@Test
    public void testParserNonProtocol() throws RemotingException {
        String url = "127.0.0.1:1111?_TIMEOUT=3000&_SERIALIZETYPE=hessian2";
        RpcAddressParser parser = new RpcAddressParser();
        Url btUrl = parser.parse(url);
        Assert.assertEquals("127.0.0.1", btUrl.getIp());
        Assert.assertEquals(1111, btUrl.getPort());
        Assert.assertEquals(null, btUrl.getProperty(RpcConfigs.URL_PROTOCOL));

        url = "127.0.0.1:1111";
        btUrl = parser.parse(url);
        Assert.assertEquals("127.0.0.1", btUrl.getIp());
        Assert.assertEquals(1111, btUrl.getPort());
        Assert.assertEquals(null, btUrl.getProperty(RpcConfigs.URL_PROTOCOL));
    }
rpc address parser test

@author jiangping
@version $Id: RpcAddressParserTest.java, v 0.1 2015-12-11 PM10:04:21 tao Exp $
src/test/java/com/alipay/remoting/rpc/addressargs/RpcAddressParserTest.java