Code example for KeyException

Methods: getCause, getMessage

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