public static void boundsCheck(int capacity, int index, int length) {
        if (capacity < 0 || index < 0 || length < 0 || (index > (capacity - length))) {
            throw new IndexOutOfBoundsException(String.format("index=%d, length=%d, capacity=%d", index, length, capacity));
        }
    }
@Test(expected = IndexOutOfBoundsException.class)
    public void boundsCheck_whenIndexIntegerMax() {
        //Testing wrapping does not cause false check
        ArrayUtils.boundsCheck(100, Integer.MAX_VALUE, 1);
    }