Code example for IllegalBlockSizeException

Methods: getCause, getMessage

0
        IllegalBlockSizeException tE;
        for (int i = 0; i < msgs.length; i++) {
            tE = new IllegalBlockSizeException(msgs[i]);
            assertEquals("getMessage() must return: ".concat(msgs[i]), tE
                    .getMessage(), msgs[i]);
            assertNull("getCause() must return null", tE.getCause());
        } 
    } 
 
    /** 
     * Test for <code>IllegalBlockSizeException(String)</code> constructor 
     * Assertion: constructs IllegalBlockSizeException when <code>msg</code> 
     * is null 
     */ 
    public void testIllegalBlockSizeException03() { 
        String msg = null;
        IllegalBlockSizeException tE = new IllegalBlockSizeException(msg);
        assertNull("getMessage() must return null.", tE.getMessage());
        assertNull("getCause() must return null", tE.getCause());
    } 
}