public static void checkPositiveInteger(long value, String argName) {
    checkArgument(value > 0, "'%s' must be a positive integer.", argName);
  }
@Test
  public void testCheckPositiveInteger() throws Exception {
    int positiveArg = 1;
    int zero = 0;
    int negativeArg = -1;

    // Should not throw.
    checkPositiveInteger(positiveArg, "positiveArg");

    // Verify it throws.

    intercept(IllegalArgumentException.class,
        "'negativeArg' must be a positive integer",
        () -> checkPositiveInteger(negativeArg, "negativeArg"));

    intercept(IllegalArgumentException.class,
        "'zero' must be a positive integer",
        () -> checkPositiveInteger(zero, "zero"));

  }