Code example for AbstractMap

Methods: equalsput

0
    } 
 
    public void test_equalsLjava_lang_Object() { 
        AbstractMap<String, String> amt1 = new AMT();
        AbstractMap<String, String> amt2 = new AMT();
        assertTrue("assert 0", amt1.equals(amt2));
        assertTrue("assert 1", amt1.equals(amt1));
        assertTrue("assert 2", amt2.equals(amt1));
        amt1.put("1", "one");
        assertFalse("assert 3", amt1.equals(amt2));
        amt1.put("2", "two");
        amt1.put("3", "three");
 
        amt2.put("1", "one");
        amt2.put("2", "two");
        amt2.put("3", "three");
        assertTrue("assert 4", amt1.equals(amt2));
        assertFalse("assert 5", amt1.equals(this));
    } 
 
    public void test_hashCode() { 
        AMT amt1 = new AMT();
        AMT amt2 = new AMT();