public static long checkPositive(long n, String name)
    {
        if (n <= 0)
        {
            throw new IllegalArgumentException(name + ": " + n + " (expected: > 0)");
        }

        return n;
    }
@Test(expected = IllegalArgumentException.class)
    public void checkPositiveMustFailIfArgumentIsLessThanZero()
    {
        RangeUtil.checkPositive(-1, "var");
    }