IndirectSet extends IndirectCollection<Set<E>> implements Set<E> { @Override public Iterator<E> iterator() { return new IndirectSetIterator<>(internalSet.iterator()); } IndirectSet();  IndirectSet(Object owner, Field f, UnitOfWorkImpl uow, Set<E> referencedSet); @Override int size(); @Override boolean isEmpty(); @Override boolean contains(Object o); @Override Iterator<E> iterator(); @Override Object[] toArray(); @Override T[] toArray(T[] a); @Override boolean add(E e); @Override boolean remove(Object o); @Override boolean containsAll(Collection<?> c); @Override boolean addAll(Collection<? extends E> c); @Override boolean retainAll(Collection<?> c); @Override boolean removeAll(Collection<?> c); @Override void clear(); @Override Set<E> unwrap(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@Test void testIteratorHasNext() { final Iterator<OWLClassA> it = set.iterator(); final Iterator<OWLClassA> indIt = target.iterator(); while (it.hasNext()) { it.next(); assertTrue(indIt.hasNext()); assertNotNull(indIt.next()); } }
@Test void testIteratorNext() { final Iterator<OWLClassA> it = set.iterator(); final Iterator<OWLClassA> indIt = target.iterator(); while (it.hasNext()) { assertTrue(indIt.hasNext()); assertEquals(it.next(), indIt.next()); } }