Code example for BadPaddingException

Methods: getCause, getMessage

0
            assertEquals("getMessage() must return: ".concat(msgs[i]), tE
                    .getMessage(), msgs[i]);
            assertNull("getCause() must return null", tE.getCause());
        } 
    } 
 
    /** 
     * Test for <code>BadPaddingException(String)</code> constructor 
     * Assertion: constructs BadPaddingException when <code>msg</code> is null 
     */ 
    @TestTargetNew( 
        level = TestLevel.COMPLETE, 
        notes = "", 
        method = "BadPaddingException", 
        args = {java.lang.String.class}
    ) 
    public void testBadPaddingException03() { 
        String msg = null;
        BadPaddingException tE = new BadPaddingException(msg);
        assertNull("getMessage() must return null.", tE.getMessage());
        assertNull("getCause() must return null", tE.getCause());