BeforeAndAfter { public Set<T> getRemovedItems() { final HashSet<T> removed = new HashSet<>(before); removed.removeAll(after); return removed; }  Set<T> getAddedItems(); Set<T> getRemovedItems(); Set<T> getIntersectedItems(); Set<T> getUnionedItems();  }
@Test public void testGetRemovedItems() { assertEquals(new HashSet<>(asList(item1)), beforeAndAfter.getRemovedItems()); }