public ProviderGroup add(ProviderInfo providerInfo) {
        if (providerInfo == null) {
            return this;
        }
        ConcurrentHashSet<ProviderInfo> tmp = new ConcurrentHashSet<ProviderInfo>(providerInfos);
        tmp.add(providerInfo); // 排重
        this.providerInfos = new ArrayList<ProviderInfo>(tmp);
        return this;
    }
@Test
    public void add() throws Exception {
        ProviderGroup pg = new ProviderGroup("xxx", null);
        Assert.assertTrue(pg.size() == 0);

        pg.add(null);
        Assert.assertTrue(pg.size() == 0);

        pg.add(ProviderHelper.toProviderInfo("127.0.0.1:12200"));
        Assert.assertTrue(pg.size() == 1);

        pg.add(ProviderHelper.toProviderInfo("127.0.0.1:12201"));
        Assert.assertTrue(pg.size() == 2);

        // 重复
        pg.add(ProviderHelper.toProviderInfo("127.0.0.1:12200"));
        Assert.assertTrue(pg.size() == 2);
    }