Code example for ObjectStreamField

0
        assertTrue("getTypeString returned: " + holaField.getTypeString(),
                holaField.getTypeString().indexOf("Object") >= 0);
        assertNull("Primitive types' strings should be null", hamField
                .getTypeString());
 
        ObjectStreamField osf = new ObjectStreamField("s", String.class, true);
        assertTrue(osf.getTypeString() == "Ljava/lang/String;");
    } 
 
    /** 
     * @tests java.io.ObjectStreamField#toString() 
     */ 
    public void test_toString() { 
        assertTrue("toString on a long returned: " + bamField.toString(),
                bamField.toString().indexOf("bam") >= 0);
    } 
 
    /** 
     * @tests java.io.ObjectStreamField#getType() 
     */ 
    public void test_getType_Deserialized() throws IOException,