@Test
    public void testConstructorOnNegativeIndex() {
        for (int i = -1000; i < 0; i++) {
            try {
                error = new ParserError(i, "hello");
                fail("no exception was thrown");
            } catch (IllegalArgumentException ex) {
            }
        }

        try {
            error = new ParserError(Integer.MIN_VALUE, "hello");
            fail("no exception was thrown");
        } catch (IllegalArgumentException ex) {
        }
    }