ProviderHelper { public static boolean isEmpty(ProviderGroup group) { return group == null || group.isEmpty(); }  static void compareGroup(ProviderGroup oldGroup, ProviderGroup newGroup,
                                    List<ProviderInfo> add, List<ProviderInfo> remove); static void compareProviders(List<ProviderInfo> oldList, List<ProviderInfo> newList,
                                        List<ProviderInfo> add, List<ProviderInfo> remove); static void compareGroups(List<ProviderGroup> oldGroups, List<ProviderGroup> newGroups,
                                     List<ProviderInfo> add,
                                     List<ProviderInfo> remove); static boolean isEmpty(ProviderGroup group); static String toUrl(ProviderInfo providerInfo); static ProviderInfo toProviderInfo(String url);  }
@Test public void isEmpty() throws Exception { ProviderGroup pg = null; Assert.assertTrue(ProviderHelper.isEmpty(pg)); pg = new ProviderGroup("xxx", null); Assert.assertTrue(ProviderHelper.isEmpty(pg)); pg = new ProviderGroup("xxx", new ArrayList<ProviderInfo>()); Assert.assertTrue(ProviderHelper.isEmpty(pg)); pg.add(ProviderHelper.toProviderInfo("127.0.0.1:12200")); Assert.assertFalse(ProviderHelper.isEmpty(pg)); }