CollectionSizedIterator implements SizedIterator<OBJECTT> { @Pure @Override public boolean hasNext() { return this.iterator.hasNext(); } CollectionSizedIterator(Collection<OBJECTT> collection); @Pure @Override boolean hasNext(); @Override OBJECTT next(); @Override void remove(); @Pure @Override int index(); @Pure @Override int totalSize(); @Pure @Override int rest();  }
@Test public void hasNext() { assertTrue(this.iterator.hasNext()); this.iterator.next(); assertTrue(this.iterator.hasNext()); this.iterator.next(); assertTrue(this.iterator.hasNext()); this.iterator.next(); assertTrue(this.iterator.hasNext()); this.iterator.next(); assertTrue(this.iterator.hasNext()); this.iterator.next(); assertFalse(this.iterator.hasNext()); }