### Question:
CollectionUtil { public static int size(final Collection<?> col) { return col != null ? col.size() : 0; } 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 testSize() { assertEquals("null", 0, CollectionUtil.size((Collection<?>) null)); final HashSet<Integer> col = new HashSet<>(); assertEquals("empty ", 0, CollectionUtil.size(col)); col.add(1); assertEquals("1", 1, CollectionUtil.size(col)); col.add(2); assertEquals("2", 2, CollectionUtil.size(col)); }