### Question:
SelectItemsIterator implements Iterator<SelectItem> { public void remove() { throw new UnsupportedOperationException(); } SelectItemsIterator(FacesContext context, UIComponent component); void remove(); boolean hasNext(); SelectItem next();  }### Answer:
@Test public void shouldThrowOnRemove() throws Exception { Iterator<SelectItem> iterator = new SelectItemsIterator(this.context, this.component); this.thrown.expect(UnsupportedOperationException.class); iterator.remove(); }