AccessControlPolicyIteratorImpl implements AccessControlPolicyIterator { @Override public void remove() { list.remove(index); } AccessControlPolicyIteratorImpl(AccessControlPolicy... policy); @Override AccessControlPolicy nextAccessControlPolicy(); @Override void skip(long amount); @Override long getSize(); @Override long getPosition(); @Override boolean hasNext(); @Override Object next(); @Override void remove(); final static AccessControlPolicyIteratorImpl EMPTY; }
@Test public void testRemove() { assertEquals(2, it.getSize()); it.remove(); assertEquals(1, it.getSize()); }