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

        return n;
    }
@Test
    public void checkLessThanMustPassIfArgumentIsLessThanExpected()
    {
        final int n = 0;
        final int actual = RangeUtil.checkLessThan(n, 1, "var");

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