### Question:
CollectionUtil { public static boolean empty(String[] arr) { if (arr == null || arr.length == 0) { return true; } for (String s : arr) { if (s != null && !"".equals(s)) { return false; } } return true; }  static boolean contains(Object[] arr, Object item); static boolean empty(String[] arr); static boolean applies(String events[], String event); static Object[] asObjectArray(Object in); static List<Object> asList(Object in); static List<T> asList(Iterable<T> in);  }### Answer:
@Test(groups = "fast") public void testEmptyOnNullCollection() { Assert.assertTrue(CollectionUtil.empty(null)); }
@Test(groups = "fast") public void testEmptyOnCollectionOfNulls() { Assert.assertTrue(CollectionUtil.empty(new String[]{null, null, null})); }
@Test(groups = "fast") public void testEmptyZeroLengthCollection() { Assert.assertTrue(CollectionUtil.empty(new String[]{})); }
@Test(groups = "fast") public void testEmptyOnCollectionOfEmptyStrings() { Assert.assertTrue(CollectionUtil.empty(new String[]{"", null, ""})); }
@Test(groups = "fast") public void testEmptyOnNonEmptyCollection1() { Assert.assertFalse(CollectionUtil.empty(new String[]{"", null, "foo"})); }
@Test(groups = "fast") public void testEmptyOnNonEmptyCollection2() { Assert.assertFalse(CollectionUtil.empty(new String[]{"bar"})); }
@Test(groups = "fast") public void testEmptyOnNonEmptyCollection3() { Assert.assertFalse(CollectionUtil.empty(new String[]{"bar", "splat", "foo"})); }