### Question:
MapperUtils { public static <I, O> List<O> mapCollection(Mapper<I, O> mapper, Collection<I> input) { requireNonNull(mapper, "mapper cannot be null"); if (input == null) { return null; } return input.stream() .map(mapper::map) .collect(toList()); } private  MapperUtils(); static List<O> mapCollection(Mapper<I, O> mapper, Collection<I> input); static Mapper<I, O> nullSafe(Mapper<I, O> mapper);  }### Answer:
@Test void shouldMapNullCollectionToNull() { List<Integer> result = MapperUtils.mapCollection(mapper, null); assertThat(result).isNull(); }
@Test void shouldMapListOfElement() { List<String> input = asList("1", "2"); List<Integer> result = MapperUtils.mapCollection(mapper, input); assertThat(result).containsExactly(1, 2); }