### Question:
AbstractIterator implements Iterator<E> { @Override public E next() { if (!hasNext()) { throw new NoSuchElementException(); } state = NOT_CACHED; return nextElement; }  @Override boolean hasNext(); @Override E next(); @Override void remove();  }### Answer:
@Test(expected = NoSuchElementException.class) public void testEmptyExceptionOnNext() { RangeIterator i = new RangeIterator(1, 0); i.next(); }