### Question:
TransformedIterator implements Iterator<T> { public void remove() { iterator.remove(); } TransformedIterator(Iterator<? extends E> iterator, Function<? super E, ? extends T> function); boolean hasNext(); T next(); void remove(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); static Iterator<T> transform(Iterator<? extends E> iter, Function<? super E, ? extends T> func); static Iterator<?> maybeTransform(Iterator<? extends E> iter, Function<? super E, ?> func);  }### Answer:
@Test(expected = IllegalStateException.class) public void testRemoveBeforeNext() { Iterator<Integer> testing = new TransformedIterator<Integer, Integer>(list.iterator(), negate); testing.remove(); }