@Test
public void previousIndex() {

	final long seed = Randoms.seed();
	final Random random = new Random(seed);
	final Array<Integer> proxy = Array.of(ObjectStore.ofLength(1000));
	for (int i = 0; i < proxy.length(); ++i) {
		proxy.set(i, random.nextInt());
	}
	final ListIterator<Integer> it = new BaseSeqIterator<>(proxy);
	while (it.hasNext()) {
		it.next();
	}
	int count = proxy.length();
	while (it.hasPrevious()) {
		--count;
		Assert.assertEquals(it.previousIndex(), count);
		Assert.assertEquals(proxy.get(it.previousIndex()), it.previous());
	}
	Assert.assertEquals(count, 0);
}