@Test
public void testFilter() {

    CheckedIterator<String, RuntimeException> iterator;
    iterator = create("one", "two", "one").filter(o -> "one".equals(o));
    assertArrayEquals(new String[]{"one", "one"}, iterator.toList().toArray());
    iterator = create("one", "two", "one").filter(o -> false);
    assertArrayEquals(new String[]{}, iterator.toList().toArray());
}