public static void checkNotNull(Object obj, String argName) {
    checkArgument(obj != null, "'%s' must not be null.", argName);
  }
@Test
  public void testCheckNotNull() throws Exception {
    String nonNullArg = "nonNullArg";
    String nullArg = null;

    // Should not throw.
    Validate.checkNotNull(nonNullArg, "nonNullArg");

    // Verify it throws.

    intercept(IllegalArgumentException.class, "'nullArg' must not be null",
        () -> Validate.checkNotNull(nullArg, "nullArg"));

  }