ResourceIterator implements Iterator<T> { @Override public void remove() { throw new UnsupportedOperationException("cannot remove " + field); } ResourceIterator(Login login, String field, @Nullable URL start, BiFunction<Login, URL, T> creator); @Override boolean hasNext(); @Override T next(); @Override void remove();  }
@Test(expected = UnsupportedOperationException.class) public void removeTest() throws IOException { Iterator<Authorization> it = createIterator(pageURLs.get(0)); it.next(); it.remove(); }