for (int i = 0; i < ints.length; i++) { CheckLongCollection checker = new CheckLongCollection(collection, i); AbstractLongListDecorator.iterate(collection, i, ints.length, checker); assertEquals(ints.length, checker.index); long[] array = new long[ints.length - i + 1]; AbstractLongListDecorator.iterate(collection, 0, i, checker); assertEquals(i, checker.index);