CollectionsUtil { public static <T> List<T> safe(List<T> list) { if(list==null) { return Collections.emptyList(); } return list; }  static List<T> safe(List<T> list);  }
@Test public void safeIterationForNullList() { List<String> stringList =null; for(String string: CollectionsUtil.safe(stringList)) { } }