Code example for SQLFeatureNotSupportedException

Methods: getCause, getErrorCode, getMessage, getSQLState

0
    /** 
     * @test java.sql.SQLFeatureNotSupportedException(Throwable) 
     */ 
    public void test_Constructor_LThrowable() { 
        Throwable cause = new Exception("MYTHROWABLE");
        SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
                cause);
        assertNotNull(sQLFeatureNotSupportedException);
        assertEquals(
                "The reason of SQLFeatureNotSupportedException should be equals to cause.toString()", 
                "java.lang.Exception: MYTHROWABLE", 
                sQLFeatureNotSupportedException.getMessage());
        assertNull(
                "The SQLState of SQLFeatureNotSupportedException should be null", 
                sQLFeatureNotSupportedException.getSQLState());
        assertEquals(
                "The error code of SQLFeatureNotSupportedException should be 0", 
                sQLFeatureNotSupportedException.getErrorCode(), 0);
        assertEquals(
                "The cause of SQLFeatureNotSupportedException set and get should be equivalent", 
                cause, sQLFeatureNotSupportedException.getCause());
    } 
 
    /** 
     * @test java.sql.SQLFeatureNotSupportedException(Throwable) 
     */