Code example for SignatureException

Methods: getCause, getMessage

0
     * Test for <code>SignatureException(Throwable)</code> constructor 
     * Assertion: constructs SignatureException when <code>cause</code> is not 
     * null 
     */ 
    @TestTargetNew( 
        level = TestLevel.PARTIAL_COMPLETE, 
        notes = "", 
        method = "SignatureException", 
        args = {java.lang.Throwable.class}
    ) 
    public void testSignatureException05() { 
        SignatureException tE = new SignatureException(tCause);
        if (tE.getMessage() != null) {
            String toS = tCause.toString();
            String getM = tE.getMessage();
            assertTrue("getMessage() should contain ".concat(toS), (getM
                    .indexOf(toS) != -1));
        } 
        assertNotNull("getCause() must not return null", tE.getCause());
        assertEquals("getCause() must return ".concat(tCause.toString()), tE
                .getCause(), tCause);