@Test
    public void testArgsIllegal() {
        Url btUrl = null;
        try {
            String url = "127.0.0.1:1111?_CONNECTTIMEOUT=-1&_TIMEOUT=3000&_SERIALIZETYPE=hessian2&_PROTOCOL=1";
            RpcAddressParser parser = new RpcAddressParser();
            btUrl = parser.parse(url);
            parser.initUrlArgs(btUrl);
            Assert.fail("Should not reach here!");
        } catch (IllegalArgumentException e) {
            logger.error("URL ARGS ILLEAGL!", e);
        }

        btUrl = null;
        try {
            String url = "127.0.0.1:1111?_CONNECTTIMEOUT=1000&_TIMEOUT=3000&_SERIALIZETYPE=hessian2&_PROTOCOL=-11";
            RpcAddressParser parser = new RpcAddressParser();
            btUrl = parser.parse(url);
            parser.initUrlArgs(btUrl);
            Assert.fail("Should not reach here!");
        } catch (IllegalArgumentException e) {
            logger.error("URL ARGS ILLEAGL!", e);
        }

        btUrl = null;
        try {
            String url = "127.0.0.1:1111?_CONNECTTIMEOUT=1000&_TIMEOUT=3000&_SERIALIZETYPE=hessian2&_CONNECTIONNUM=-11";
            RpcAddressParser parser = new RpcAddressParser();
            btUrl = parser.parse(url);
            parser.initUrlArgs(btUrl);
            Assert.fail("Should not reach here!");
        } catch (IllegalArgumentException e) {
            logger.error("URL ARGS ILLEAGL!", e);
        }
    }
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