HashSet set2 = new HashSet();
set2.add("Key#1000");
assertFalse("set has not Key#1000", set.contains("Key#1000"));
assertTrue("Key#1000 was added", set.addAll(set2));
assertEquals("Size == 1001", 1001, set.size());
assertTrue("Key#1000 was removed", set.removeAll(set2));
assertEquals("Size == 1000", 1000, set.size());
set.add("Key#1000");
assertTrue("Key#1000 was removed", set.retainAll(set2));
assertEquals("Size == 1", 1, set.size());
assertTrue("set contains [Key#1000]", set.containsAll(set2));