@Test
public void testSingleIterator() {

   ArrayList<Integer> arrayList = new ArrayList<>();
   for (int i = 0; i < 1000; i++) {
      arrayList.add(i);
   }
   MultiResettableIterator<Integer> iterator = new MultiResettableIterator<>(new ResettableIterator[]{ArrayResettableIterator.iterator(arrayList)});
   for (int i = 0; i < 1000; i++) {
      assertTrue(iterator.hasNext());
      assertEquals(Integer.valueOf(i), iterator.next());
   }
   assertFalse(iterator.hasNext());
   iterator.reset();
   for (int i = 0; i < 1000; i++) {
      assertTrue(iterator.hasNext());
      assertEquals(Integer.valueOf(i), iterator.next());
   }
   assertFalse(iterator.hasNext());
}