Code example for ExemptionMechanismException

Methods: equals, getCause, getMessage

0
        args = {java.lang.String.class}
    ) 
    public void testExemptionMechanismException02() { 
        ExemptionMechanismException tE;
        for (int i = 0; i < msgs.length; i++) {
            tE = new ExemptionMechanismException(msgs[i]);
            assertEquals("getMessage() must return: ".concat(msgs[i]), tE
                    .getMessage(), msgs[i]);
            assertNull("getCause() must return null", tE.getCause());
            try { 
                throw tE;
            } catch (Exception e) {
                assertTrue(createErr(tE, e), tE.equals(e));
            } 
        } 
    } 
 
    /** 
     * Test for <code>ExemptionMechanismException(String)</code> constructor 
     * Assertion: constructs ExemptionMechanismException when <code>msg</code> 
     * is null