public int size() {
        return providerInfos == null ? 0 : providerInfos.size();
    }
@Test
    public void size() throws Exception {
        ProviderGroup pg = new ProviderGroup("xxx", null);
        Assert.assertTrue(pg.size() == 0);

        pg = new ProviderGroup("xxx", new ArrayList<ProviderInfo>());
        Assert.assertTrue(pg.size() == 0);

        pg = new ProviderGroup("xxx", Arrays.asList(ProviderHelper.toProviderInfo("127.0.0.1:12200")));
        Assert.assertTrue(pg.size() == 1);
    }