188189190191192193194195196197198
ISet set = newSet(); for (int i = 1; i <= 10; i++) { set.add("item" + i); } assertEquals(10, set.size()); set.clear(); assertEquals(0, set.size()); } @Test public void testClear_whenSetEmpty() {
195196197198199200201202203204205
} @Test public void testClear_whenSetEmpty() { ISet set = newSet(); set.clear(); assertEquals(0, set.size()); } // ======================== retainAll ==========================