Code example for Element

Methods: getUserData, setUserData

0
        } 
    } 
 
    public void testUserDataRejectsNullKey() { 
        try { 
            menu.setUserData(null, "apple", null);
            fail();
        } catch (NullPointerException e) {
        } 
        try { 
            menu.getUserData(null);
            fail();
        } catch (NullPointerException e) {
        } 
    } 
 
    /** 
     * A shallow clone requires cloning the attributes but not the child nodes. 
     */ 
    public void testUserDataHandlerNotifiedOfShallowClones() { 
        RecordingHandler handler = new RecordingHandler();