150151152153154155156157158159160
Set removed = new HashSet(); for (int i = 1; i <= 10; i++) { set.add("item" + i); removed.add("item" + i); } set.removeAll(removed); assertEquals(0, set.size()); } // ======================== iterator ========================== @Test