@Test
public void testToList() {

    CheckedIterator<String, RuntimeException> iterator;
    iterator = create("one", "two", "three");
    assertArrayEquals(new String[]{"one", "two", "three"}, iterator.toList().toArray());
    iterator = create("one", "two", "three");
    iterator.next();
    assertArrayEquals(new String[]{"two", "three"}, iterator.toList().toArray());
    iterator = create();
    assertArrayEquals(new String[]{}, iterator.toList().toArray());
}