Code example for HashMap

Methods: put, remove

0
     */ 
    public void test_removeLjava_lang_Object() { 
        Object key = new Object();
        Object value = new Object();
 
        AbstractMap map1 = new HashMap(0);
        map1.put("key", value);
        assertSame("HashMap(0)", map1.remove("key"), value);
 
        AbstractMap map4 = new IdentityHashMap(1);
        map4.put(key, value);
        assertSame("IdentityHashMap", map4.remove(key), value);
 
        AbstractMap map5 = new LinkedHashMap(122);
        map5.put(key, value);
        assertSame("LinkedHashMap", map5.remove(key), value);
 
        AbstractMap map6 = new TreeMap(new Comparator() {
            // Bogus comparator 
            public int compare(Object object1, Object object2) {
                return 0;