Code example for AbstractMap.SimpleEntry

0
    /** 
     * @tests serialization/deserialization. 
     */ 
    @SuppressWarnings({ "unchecked", "boxing" }) 
    public void testSerializationSelf_SimpleEntry() throws Exception { 
        Entry e = new AbstractMap.SimpleEntry<Integer, String>(1, "test");
        SerializationTest.verifySelf(e);
    } 
 
    /** 
     * @tests serialization/deserialization compatibility with RI. 
     */ 
    @SuppressWarnings({ "unchecked", "boxing" }) 
    public void testSerializationCompatibility_SimpleEntry() throws Exception { 
        SimpleEntry e = new AbstractMap.SimpleEntry<Integer, String>(1, "test");        
        SerializationTester.assertCompabilityEquals(e, "serialization/java/util/AbstractMapTest_SimpleEntry.golden.ser");
    } 
} 
Contextual code suggestions in your IDE  Get Codota for Java