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

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