Code example for InvalidKeyException

Methods: getCausegetMessage

0
     * Test for <code>InvalidKeyException(String)</code> constructor 
     * Assertion: constructs InvalidKeyException when <code>msg</code> is null 
     */ 
    public void testInvalidKeyException03() { 
        String msg = null;
        InvalidKeyException tE = new InvalidKeyException(msg);
        assertNull("getMessage() must return null.", tE.getMessage());
        assertNull("getCause() must return null", tE.getCause());
    } 
 
    /** 
     * Test for <code>InvalidKeyException(Throwable)</code> constructor 
     * Assertion: constructs InvalidKeyException when <code>cause</code> is 
     * null 
     */ 
    public void testInvalidKeyException04() { 
        Throwable cause = null;
        InvalidKeyException tE = new InvalidKeyException(cause);
        assertNull("getMessage() must return null.", tE.getMessage());
        assertNull("getCause() must return null", tE.getCause());