@Test public void checkPositiveMustPassIfArgumentIsGreaterThanZero() { final long n = 1; final long actual = RangeUtil.checkPositive(n, "var"); assertThat(actual, is(equalTo(n))); }
public static long checkPositive(long n, String name) { if (n <= 0) { throw new IllegalArgumentException(name + ": " + n + " (expected: > 0)"); } return n; }
RangeUtil { public static long checkPositive(long n, String name) { if (n <= 0) { throw new IllegalArgumentException(name + ": " + n + " (expected: > 0)"); } return n; } }
RangeUtil { public static long checkPositive(long n, String name) { if (n <= 0) { throw new IllegalArgumentException(name + ": " + n + " (expected: > 0)"); } return n; }  }
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); }
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);  }