/** Maps with same contents are equal */ public void testEquals() { ConcurrentNavigableMap map1 = map5(); ConcurrentNavigableMap map2 = map5(); assertEquals(map1, map2); assertEquals(map2, map1); map1.clear(); assertFalse(map1.equals(map2)); assertFalse(map2.equals(map1)); }
/** clear removes all pairs */ public void testClear() { ConcurrentNavigableMap map = map5(); map.clear(); assertEquals(map.size(), 0); }