@Test
    public void testRemoveAddress() {
        String poolKey = ip + ":" + port;
        final Url addr = new Url(ip, port);

        try {
            this.addressParser.initUrlArgs(addr);
            Connection conn = cm.getAndCreateIfAbsent(addr);
            try {
                cm.check(conn);
            } catch (Exception e) {
                Assert.assertTrue(false);
            }
            conn = cm.getAndCreateIfAbsent(addr);
            cm.check(conn);
            Assert.assertTrue(true);
            cm.remove(poolKey);
            Assert.assertEquals(0, cm.count(poolKey));
        } catch (Exception e) {
            Assert.assertTrue(false);
        }
    }
Rpc connection manager test

@author xiaomin.cxm
@version $Id: RpcConnectionManagerTest.java, v 0.1 Mar 9, 2016 8:09:44 PM xiaomin.cxm Exp $
src/test/java/com/alipay/remoting/inner/connection/RpcConnectionManagerTest.java