void () { Object[] values = new Object[]{"1", new Object(), "3", new Object()}; Iterator iterator = FilteringIterator.create(Arrays.asList(values).iterator(), STRINGS_ONLY); assertThat(ContainerUtil.collect(iterator)).containsExactly("1", "3"); }