@Test
public void testCopyInto() {

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