Code example for IdentityHashMap

Methods: put

     * java.util.IdentityHashMap#Serialization() 
    public void test_Serialization() throws Exception { 
        IdentityHashMap<String, String> map = new IdentityHashMap<String, String>();
        map.put(ID, "world");
        // BEGIN android-added 
        // Regression test for null key in serialized IdentityHashMap (1178549) 
        // Together with this change the IdentityHashMap.golden.ser resource 
        // was replaced by a version that contains a map with a null key. 
        map.put(null, "null");
        // END android-added 
        SerializationTest.verifySelf(map, comparator);
        SerializationTest.verifyGolden(this, map, comparator);
     * Sets up the fixture, for example, open a network connection. This method 
     * is called before a test is executed.