Code example for InvocationTargetException

Methods: printStackTrace

0
            return; 
        } catch (Exception e) {
            fail("Exception during InvocationTargetException test : "
                    + e.getMessage());
        } 
        fail("Failed to throw exception");
    } 
 
    /** 
     * @tests java.lang.reflect.InvocationTargetException#printStackTrace() 
     */ 
    @TestTargetNew( 
        level = TestLevel.COMPLETE, 
        notes = "", 
        method = "printStackTrace", 
        args = {} 
    ) 
    public void test_printStackTrace() { 
        // Test for method void 
        // java.lang.reflect.InvocationTargetException.printStackTrace() 
        try {