Code example for InvalidKeySpecException

Methods: getCause, getMessage

0
     * Assertion: constructs InvalidKeySpecException when <code>msg</code> is 
     * null 
     */ 
    public void testInvalidKeySpecException03() { 
        String msg = null;
        InvalidKeySpecException tE = new InvalidKeySpecException(msg);
        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 null 
     */ 
    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());
    }