@Test public void testRemoveAllFail() { addStringsToCollection(bag); Set<String> remove = new HashSet<>(); remove.add("Not in the list"); Assert.assertFalse(bag.removeAll(remove)); Assert.assertEquals(4, bag.size()); }
@Test public void testRemoveAllWithCollection() { addStringsToCollection(bag); Set<String> remove = new HashSet<>(); addStringsToCollection(remove); Assert.assertTrue(bag.removeAll(remove)); Assert.assertEquals(0, bag.size()); }