@Test(expected = NoSuchElementException.class) public void nextException() { Result result = new Result(expected); for (int i = 0; i <= expected.size(); i++) { result.next(); } }
@Override public URL next() { if (hasNext()) return data.get(index++); else throw new NoSuchElementException("There are no elements size = " + data.size()); }
Result implements Iterator<URL> { @Override public URL next() { if (hasNext()) return data.get(index++); else throw new NoSuchElementException("There are no elements size = " + data.size()); } }
Result implements Iterator<URL> { @Override public URL next() { if (hasNext()) return data.get(index++); else throw new NoSuchElementException("There are no elements size = " + data.size()); } Result(List<URL> searched); }
Result implements Iterator<URL> { @Override public URL next() { if (hasNext()) return data.get(index++); else throw new NoSuchElementException("There are no elements size = " + data.size()); } Result(List<URL> searched); @Override URL next(); @Override boolean hasNext(); }
Result implements Iterator<URL> { @Override public URL next() { if (hasNext()) return data.get(index++); else throw new NoSuchElementException("There are no elements size = " + data.size()); } Result(List<URL> searched); @Override URL next(); @Override boolean hasNext();  }