### Question:
CollectionUtils { public static List<String> toUpperList(List<String> sourceList) { if (isEmpty(sourceList)) { return sourceList; } List<String> destList = new ArrayList<>(sourceList.size()); for (String element : sourceList) { if (element != null) { destList.add(element.toUpperCase()); } else { destList.add(null); } } return destList; } private  CollectionUtils(); static boolean isEmpty(Collection<?> col); static boolean isNotEmpty(Collection<?> col); static boolean isEmpty(Object[] array); static boolean isNotEmpty(Object[] array); static String toString(Collection<?> col); static boolean isSizeEquals(Collection<?> col0, Collection<?> col1); static String encodeMap(Map<String, String> map); static Map<String, String> decodeMap(String data); static List<String> toUpperList(List<String> sourceList);  }### Answer:
@Test public void testToUpperList() { List<String> sourceList = null; Assertions.assertNull(CollectionUtils.toUpperList(sourceList)); sourceList = new ArrayList<>(); Assertions.assertEquals(Collections.EMPTY_LIST, CollectionUtils.toUpperList(sourceList)); List<String> anotherList = new ArrayList<>(); sourceList.add("a"); anotherList.add("A"); sourceList.add("b"); anotherList.add("b"); sourceList.add("c"); anotherList.add("C"); Assertions.assertEquals(CollectionUtils.toUpperList(sourceList), CollectionUtils.toUpperList(anotherList)); anotherList.add("D"); Assertions.assertTrue( CollectionUtils.toUpperList(anotherList).containsAll(CollectionUtils.toUpperList(sourceList))); List<String> listWithNull = new ArrayList<>(); listWithNull.add("foo"); listWithNull.add(null); listWithNull.add("bar"); List<String> listUpperWithNull = new ArrayList<>(); listUpperWithNull.add("FOO"); listUpperWithNull.add(null); listUpperWithNull.add("BAR"); Assertions.assertEquals(listUpperWithNull, CollectionUtils.toUpperList(listWithNull)); }