@Test(expected = NoSuchElementException.class) public void testNext() { final LsaIteratorImpl iterator = new LsaIteratorImpl(); assertEquals(iterator.next(), "1"); assertEquals(iterator.next(), "2"); new EmptyLsaIterator().next(); }
@Override public final T next() { if (!hasNext()) { throw new NoSuchElementException(); } return nextIteration(); }
LsaIterator implements Iterator<T> { @Override public final T next() { if (!hasNext()) { throw new NoSuchElementException(); } return nextIteration(); } }
LsaIterator implements Iterator<T> { @Override public final T next() { if (!hasNext()) { throw new NoSuchElementException(); } return nextIteration(); }  }
LsaIterator implements Iterator<T> { @Override public final T next() { if (!hasNext()) { throw new NoSuchElementException(); } return nextIteration(); }  @Override void remove(); @Override final T next(); abstract T nextIteration(); }
LsaIterator implements Iterator<T> { @Override public final T next() { if (!hasNext()) { throw new NoSuchElementException(); } return nextIteration(); }  @Override void remove(); @Override final T next(); abstract T nextIteration();  }