### Question:
RangeUtil { public static long checkPositive(long n, String name) { if (n <= 0) { throw new IllegalArgumentException(name + ": " + n + " (expected: > 0)"); } return n; }  static long checkPositive(long n, String name); static int checkPositiveOrZero(int n, String name); static int checkLessThan(int n, int expected, String name); static int checkLessThanOrEqual(int n, long expected, String name); static int checkGreaterThanOrEqual(int n, int expected, String name);  }### Answer:
@Test(expected = IllegalArgumentException.class) public void checkPositiveMustFailIfArgumentIsZero() { RangeUtil.checkPositive(0, "var"); }
@Test(expected = IllegalArgumentException.class) public void checkPositiveMustFailIfArgumentIsLessThanZero() { RangeUtil.checkPositive(-1, "var"); }
@Test public void checkPositiveMustPassIfArgumentIsGreaterThanZero() { final long n = 1; final long actual = RangeUtil.checkPositive(n, "var"); assertThat(actual, is(equalTo(n))); }