@Test
public void removeAll() 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"),
        ProviderHelper.toProviderInfo("127.0.0.1:12204")));
    Assert.assertTrue(pg.size() == 4);
    pg.removeAll(null);
    Assert.assertTrue(pg.size() == 4);
    pg.removeAll(new ArrayList<ProviderInfo>());
    Assert.assertTrue(pg.size() == 4);
    // 删没有的
    pg.removeAll(Arrays.asList(ProviderHelper.toProviderInfo("127.0.0.1:12205"),
        ProviderHelper.toProviderInfo("127.0.0.1:12206")));
    Assert.assertTrue(pg.size() == 4);
    // 删部分有的
    pg.removeAll(Arrays.asList(ProviderHelper.toProviderInfo("127.0.0.1:12204"),
        ProviderHelper.toProviderInfo("127.0.0.1:12205")));
    Assert.assertTrue(pg.size() == 3);
    // 删都有的
    pg.removeAll(Arrays.asList(ProviderHelper.toProviderInfo("127.0.0.1:12202"),
        ProviderHelper.toProviderInfo("127.0.0.1:12203")));
    Assert.assertTrue(pg.size() == 1);
    // 重复删
    pg.removeAll(Arrays.asList(ProviderHelper.toProviderInfo("127.0.0.1:12202"),
        ProviderHelper.toProviderInfo("127.0.0.1:12203")));
    Assert.assertTrue(pg.size() == 1);
}