passing tests for ArrayListIterator nextIndex and previousIndex