### Question:
CollectionUtil { public static boolean isNotEmpty(final Collection<?> col) { return col != null && !col.isEmpty(); } private  CollectionUtil(); static boolean isEmpty(final Collection<?> col); static boolean isNotEmpty(final Collection<?> col); static boolean hasOneItem(final Collection<?> col); static boolean isNotEmpty(final Object[] array); static int size(final Collection<?> col); static boolean contains(final Collection<?> collection, final Object item); static boolean containsAny(final Collection<?> collection, final Object... items); static boolean noneEmpty(final Collection<?>... collections); static boolean sameContent(final Collection<?> c1, final Collection<?> c2);  }### Answer:
@Test public void testIsNotEmptyCollection() { assertFalse("null", CollectionUtil.isNotEmpty((Collection<?>) null)); final HashSet<Integer> col = new HashSet<>(); assertFalse("empty set", CollectionUtil.isNotEmpty(col)); col.add(1); assertTrue("not empty set", CollectionUtil.isNotEmpty(col)); col.add(2); assertTrue("2 empty set", CollectionUtil.isNotEmpty(col)); }
@Test public void testIsNotEmptyObjectArray() { assertFalse("null", CollectionUtil.isNotEmpty((Object[]) null)); Object[] col = new String[0]; assertFalse("empty set", CollectionUtil.isNotEmpty(col)); col = new String[1]; assertTrue("not empty set", CollectionUtil.isNotEmpty(col)); }