Code example for InvalidKeySpecException

Methods: getCause, getMessage

0
        notes = "Verifies null as a parameter.", 
        method = "InvalidKeySpecException", 
        args = {java.lang.Throwable.class}
    ) 
    public void testInvalidKeySpecException04() { 
        Throwable cause = null;
        InvalidKeySpecException tE = new InvalidKeySpecException(cause);
        assertNull("getMessage() must return null.", tE.getMessage());
        assertNull("getCause() must return null", tE.getCause());
    } 
 
    /** 
     * Test for <code>InvalidKeySpecException(Throwable)</code> constructor 
     * Assertion: constructs InvalidKeySpecException when <code>cause</code> 
     * is not null 
     */ 
    @TestTargetNew( 
        level = TestLevel.PARTIAL_COMPLETE, 
        notes = "Verifies positive cases.", 
        method = "InvalidKeySpecException", 
        args = {java.lang.Throwable.class}