public static <T> T notNull(T obj, String name) {
    if (obj == null) {
      throw new IllegalArgumentException(name + " cannot be null");
    }
    return obj;
  }
@Test(expected = IllegalArgumentException.class)
  public void notNullNull() {
    Check.notNull(null, "name");
  }