public static String notEmpty(String str, String name) {
    if (str == null) {
      throw new IllegalArgumentException(name + " cannot be null");
    }
    if (str.length() == 0) {
      throw new IllegalArgumentException(name + " cannot be empty");
    }
    return str;
  }
@Test(expected = IllegalArgumentException.class)
  public void notEmptyNull() {
    Check.notEmpty(null, "name");
  }