### Question:
CollectionUtils { public static <T> T any(Collection<T> c) { return any((Iterable<T>) c); } private  CollectionUtils(); @SafeVarargs static Set<T> asSet(T... items); @SuppressWarnings({ "rawtypes", "unchecked" }) static Set<T> asSet(Collection<T> c); static Set<T> asSet(Iterator<T> it); static Set<T> asSet(Iterable<T> iterable); @SafeVarargs static List<T> asList(T... items); static List<T> asList(List<T> list); static List<T> asList(Collection<T> c); static Collection<T> nonNull(Collection<T> c); static Collection<T> asCollection(Collection<T> c); static List<T> asList(Enumeration<T> enumeration); static List<T> asList(Iterable<T> it); static List<T> asList(Iterator<T> it); @SuppressWarnings("unchecked") // we checked the elements of the list static List<T> asList(List<?> list, Class<T> clazz); @SuppressWarnings("unchecked") // we checked the elements of the collection static Collection<T> asCollection(Collection<?> collection, Class<T> clazz); static boolean isAllSameType(Collection<?> list, Class<T> clazz); @SafeVarargs // this is safe, as we are only using Object methods static boolean isOneOf(T t, T... possibles); static boolean isAllNull(Object... objects); static boolean isAllNull(Collection<T> c); static boolean isBlank(Collection<T> c); @SuppressWarnings("unchecked") static boolean isBlank(T... t); static Iterable<T> asIterable(T t); static Iterable<T> asIterable(Iterator<T> iterator); @SafeVarargs static Iterable<T> asIterable(Iterable<T>... iterables); static Stream<T> asStream(Iterator<T> iterator); @SafeVarargs static Stream<T> asStream(Iterable<T>... iterables); static T any(Collection<T> c); static T any(Iterable<T> iterable);  }### Answer:
@Test public void testAny() { Collection<String> c = Arrays.asList("One", "Two"); String any = CollectionUtils.any(c); assertNotNull(any); assertThat(any, isOneOf("One", "Two")); }
@Test public void testAny_Empty() { Collection<String> c = Collections.emptyList(); String any = CollectionUtils.any(c); assertNull(any); }
@Test public void testAnyNull() { Collection<String> c = null; String any = CollectionUtils.any(c); assertNull(any); }