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

        return n;
    }
@Test(expected = IllegalArgumentException.class)
    public void checkLessThanOrEqualMustFailIfArgumentIsGreaterThanExpected()
    {
        RangeUtil.checkLessThanOrEqual(1, 0, "var");
    }