IndirectSet extends IndirectCollection<Set<E>> implements Set<E> { @Override public boolean add(E e) { boolean res = internalSet.add(e); if (res) { persistChange(); } return res; } 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 testAdd() { final OWLClassA a = new OWLClassA(); a.setUri(URI.create("http: a.setStringAttribute("testAttribute"); target.add(a); verify(uow).attributeChanged(owner, ownerField); assertEquals(backupSet.size() + 1, set.size()); }
@Test void equalsReturnsFalseForInEqualIndirectSets() { set.add(Generators.generateOwlClassAInstance()); assertNotEquals(backupSet, target); }