@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);
}