EmptyEventListenerIterator implements EventListenerIterator { @Override public void skip(long skipNum) { if (skipNum > 0L) { throw new NoSuchElementException(); } }  @Override EventListener nextEventListener(); @Override void skip(long skipNum); @Override long getSize(); @Override long getPosition(); @Override boolean hasNext(); @Override Object next();  }
@Test(expected = NoSuchElementException.class) public void testSkipNonZero() { new EmptyEventListenerIterator().skip(1L); }