JcrEmptyPropertyIterator implements PropertyIterator { @Override public void remove() { throw new UnsupportedOperationException(); } private  JcrEmptyPropertyIterator(); @Override Property nextProperty(); @Override long getPosition(); @Override long getSize(); @Override void skip( long skipNum ); @Override boolean hasNext(); @Override Object next(); @Override void remove();  }
@Test( expected = UnsupportedOperationException.class ) public void shouldNotAllowRemove() { iter.remove(); }