### Question:
CollectionUtils { public static boolean isEqualCollection(final Collection<?> a, final Collection<?> b) { if (a.size() != b.size()) { return false; } final CardinalityHelper<Object> helper = new CardinalityHelper<>(a, b); if (helper.cardinalityA.size() != helper.cardinalityB.size()) { return false; } for (final Object obj : helper.cardinalityA.keySet()) { if (helper.freqA(obj) != helper.freqB(obj)) { return false; } } return true; } private  CollectionUtils(); static Collection<T> subtract(Set<T> a, Set<T> b); static boolean isNotEmpty(Collection coll); static boolean isEmpty(Collection coll); static Map<String, String> stringToMap(String str, String separator); static Map<String, String> stringToMap(String str, String separator, String keyPrefix); static boolean equalLists(Collection<?> a, Collection<?> b); static boolean isEqualCollection(final Collection<?> a, final Collection<?> b); static Map<O, Integer> getCardinalityMap(final Iterable<? extends O> coll); static List<Map<String, Object>> getListByExclusion(List<T> originList, Set<String> exclusionSet);  }### Answer:
@Test public void isEqualCollection() { List<Integer> a = new ArrayList<>(); a.add(1); List<Integer> b = new ArrayList<>(); b.add(1); Assert.assertTrue(CollectionUtils.isEqualCollection(a,b)); b.add(2); Assert.assertFalse(CollectionUtils.isEqualCollection(a,b)); }