### Question:
ParamChecker { public static List<String> notEmptyElements(List<String> list, String name) { Objects.requireNonNull(list, () -> String.format("%s cannot be null", name)); for (int i = 0; i < list.size(); i++) { notEmpty(list.get(i), XLog.format("list [{0}] element [{1}]", name, i)); } return list; }  static String notEmpty(String str, String name); static String notEmpty(String str, String name, String info); static List<String> notEmptyElements(List<String> list, String name); static String validateActionName(String actionName); static boolean isValidIdentifier(String token); static int checkGTZero(int value, String name); static int checkGEZero(int value, String name); static int checkLEZero(int value, String name); static int checkInteger(String val, String name); static String checkFrequency(String val); static Date checkDateOozieTZ(String date, String name); static TimeZone checkTimeZone(String tzStr, String name); static boolean isMember(String item, String[] members, String name);  }### Answer:
@Test public void testNotNullElements() { ParamChecker.notEmptyElements(new ArrayList<String>(), "name"); ParamChecker.notEmptyElements(Arrays.asList("a"), "name"); try { ParamChecker.notEmptyElements(null, "name"); fail(); } catch (IllegalArgumentException | NullPointerException ex) { } try { ParamChecker.notEmptyElements(Arrays.asList("a", null), "name"); fail(); } catch (IllegalArgumentException ex) { } }
@Test public void testNotEmptyElements() { ParamChecker.notEmptyElements(new ArrayList<String>(), "name"); ParamChecker.notEmptyElements(Arrays.asList("a"), "name"); try { ParamChecker.notEmptyElements(null, "name"); fail(); } catch (IllegalArgumentException | NullPointerException ex) { } try { ParamChecker.notEmptyElements(Arrays.asList("a", null), "name"); fail(); } catch (IllegalArgumentException ex) { } }