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;
  }
@Test
  public void notNullElementsNotNull() {
    Check.notNullElements(new ArrayList<String>(), "name");
    Check.notNullElements(Arrays.asList("a"), "name");
  }