AccessControlPolicyIteratorImpl implements AccessControlPolicyIterator { @Override public AccessControlPolicy nextAccessControlPolicy() { if (index < list.size()) { return list.get(index++); } throw new NoSuchElementException(); } 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 testNextAccessControlPolicy() throws RepositoryException { AccessControlList acl = (AccessControlList)it.nextAccessControlPolicy(); AccessControlEntry[] entries = acl.getAccessControlEntries(); assertEquals(1, entries.length); }