### Question:
FilteredIterator implements Iterator<T> { public T next() { if (hasNext()) { return returnNext(); } throw new NoSuchElementException(); } FilteredIterator(Iterator<? extends T> iterator, Predicate<? super T> predicate); boolean hasNext(); T next(); void remove(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); @SuppressWarnings("unchecked") static Iterator<T> filter(Iterator<? extends T> iter, Predicate<? super T> pred);  }### Answer:
@Test(expected = NoSuchElementException.class) public void testNextOnEmptyList() { Iterator<Integer> testing = new FilteredIterator<Integer>(new ArrayList<Integer>().iterator(), isEven); testing.next(); }