public ProviderGroup remove(ProviderInfo providerInfo) {
        if (providerInfo == null) {
            return this;
        }
        ConcurrentHashSet<ProviderInfo> tmp = new ConcurrentHashSet<ProviderInfo>(providerInfos);
        tmp.remove(providerInfo); // 排重
        this.providerInfos = new ArrayList<ProviderInfo>(tmp);
        return this;
    }
@Test
    public void remove() throws Exception {
        ProviderGroup pg = new ProviderGroup("xxx", Arrays.asList(ProviderHelper.toProviderInfo("127.0.0.1:12201"),
            ProviderHelper.toProviderInfo("127.0.0.1:12202"),
            ProviderHelper.toProviderInfo("127.0.0.1:12203")));
        Assert.assertTrue(pg.size() == 3);

        pg.remove(null);
        Assert.assertTrue(pg.size() == 3);

        pg.remove(ProviderHelper.toProviderInfo("127.0.0.1:12204"));
        Assert.assertTrue(pg.size() == 3);

        pg.remove(ProviderHelper.toProviderInfo("127.0.0.1:12203"));
        Assert.assertTrue(pg.size() == 2);

        // 重复
        pg.remove(ProviderHelper.toProviderInfo("127.0.0.1:12203"));
        Assert.assertTrue(pg.size() == 2);

        pg.remove(ProviderHelper.toProviderInfo("127.0.0.1:12202"));
        Assert.assertTrue(pg.size() == 1);
    }