@Nonnull
    public static <T> Traverser<T> traverseIterator(@Nonnull Iterator<? extends T> iterator) {
        return () -> iterator.hasNext() ? requireNonNull(iterator.next(), "Iterator returned a null item") : null;
    }
@Test
    public void when_traverseIteratorIgnoringNulls_then_filteredOut() {
        Traverser<Integer> trav = traverseIterator(asList(null, 1, null, 2, null).iterator(), true);
        assertEquals(1, (int) trav.next());
        assertEquals(2, (int) trav.next());
        assertNull(trav.next());
    }