### Question:
Check { public static <T> List<T> notNullElements(List<T> list, String name) { notNull(list, name); for (int i = 0; i < list.size(); i++) { notNull(list.get(i), MessageFormat.format("list [{0}] element [{1}]", name, i)); } return list; }  static T notNull(T obj, String name); static List<T> notNullElements(List<T> list, String name); static String notEmpty(String str, String name); static List<String> notEmptyElements(List<String> list, String name); static String validIdentifier(String value, int maxLen, String name); static int gt0(int value, String name); static long gt0(long value, String name); static int ge0(int value, String name); static long ge0(long value, String name);  }### Answer:
@Test public void notNullElementsNotNull() { Check.notNullElements(new ArrayList<String>(), "name"); Check.notNullElements(Arrays.asList("a"), "name"); }
@Test(expected = IllegalArgumentException.class) public void notNullElementsNullList() { Check.notNullElements(null, "name"); }
@Test(expected = IllegalArgumentException.class) public void notNullElementsNullElements() { Check.notNullElements(Arrays.asList("a", "", null), "name"); }