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 checkLessThanMustFailIfArgumentIsEqualToExpected()
    {
        final int n = 1;
        final int actual = RangeUtil.checkLessThan(1, 1, "var");

        assertThat(actual, is(equalTo(n)));
    }