CollectionUtils { public static <T> boolean isNullOrEmpty(Collection<T> collection) { return collection == null || collection.isEmpty(); }  static boolean isNullOrEmpty(Collection<T> collection); static List<T> mergeLists(List<T> list1, List<T> list2); static String join(Collection<String> toJoin, String separator);  }
@Test public void isEmpty_NullCollection_ReturnsTrue() { assertTrue(CollectionUtils.isNullOrEmpty(null)); }
@Test public void isEmpty_EmptyCollection_ReturnsTrue() { assertTrue(CollectionUtils.isNullOrEmpty(Collections.emptyList())); }
@Test public void isEmpty_NonEmptyCollection_ReturnsFalse() { assertFalse(CollectionUtils.isNullOrEmpty(Arrays.asList("something"))); }