### Question:
EmptyIterator implements Iterator<T>, Serializable { public T next() { throw new NoSuchElementException(UtilConstants.ERR_NEXT_ON_EMPTY_ITR); }  boolean hasNext(); T next(); void remove();  }### Answer:
@Test public void next() { EmptyIterator<Object> i = new EmptyIterator<>(); try { i.next(); Assert.fail(); } catch (NoSuchElementException e) { } }