AuthorizableIterator implements Iterator<Authorizable> { @Override public void remove() { throw new UnsupportedOperationException(); } private  AuthorizableIterator(Iterator<Authorizable> authorizables, long size); @Override boolean hasNext(); @Override Authorizable next(); @Override void remove();  }
@Test(expected = UnsupportedOperationException.class) public void testRemove() { AuthorizableIterator it = AuthorizableIterator.create(userOakPathIterator, (UserManagerImpl) getUserManager(root), AuthorizableType.USER); it.next(); it.remove(); }