SqlPartIterator implements Iterator<SqlPart> { @Override public void remove() { throw new UnsupportedOperationException("Cannot remove SqlParts."); } SqlPartIterator(@NotNull final SqlPart first); @Override boolean hasNext(); @Override SqlPart next(); @Override void remove();  }
@Test(expected = UnsupportedOperationException.class) public void remove_isUnsupported() { SqlPartIterator iterator = new SqlPartIterator(mock(SqlPart.class)); iterator.remove(); }