AccessControlPolicyIteratorImpl implements AccessControlPolicyIterator { @Override public Object next() { return list.get(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 testNext() throws RepositoryException { AccessControlList acl = (AccessControlList)it.next(); AccessControlEntry[] entries = acl.getAccessControlEntries(); assertEquals("alice", entries[0].getPrincipal().getName()); acl = (AccessControlList)it.next(); entries = acl.getAccessControlEntries(); assertEquals("bob", entries[0].getPrincipal().getName()); }