BeforeAndAfter { public Set<T> getUnionedItems() { final HashSet<T> union = new HashSet<>(before); union.addAll(after); return union; }  Set<T> getAddedItems(); Set<T> getRemovedItems(); Set<T> getIntersectedItems(); Set<T> getUnionedItems();  }
@Test public void testGetUionedItems() { assertEquals(new HashSet<>(asList(item1, item2, item3, item4)), beforeAndAfter.getUnionedItems()); }