Code example for UndeclaredThrowableException

Methods: getCause

0
    /** 
     * @tests {@link java.lang.reflect.UndeclaredThrowableException#UndeclaredThrowableException(java.lang.Throwable)} 
     * 
     */ 
    public void test_UndeclaredThrowableException_LThrowable() { 
        UndeclaredThrowableException e = new UndeclaredThrowableException(
                (Exception) null);
        assertNotNull(e);
        assertNull(e.getCause());
 
    } 
 
    /** 
     * @tests {@link java.lang.reflect.UndeclaredThrowableException#UndeclaredThrowableException(java.lang.Throwable, java.lang.String)} 
     * 
     */ 
    public void test_UndeclaredThrowableException_LThrowable_LString() { 
        UndeclaredThrowableException e = new UndeclaredThrowableException(null,
                "SomeMsg"); 
        assertNotNull(e);
        assertNull(e.getCause());