@Test
public void testSqlError() throws SQLException {

    
    JDBCCertRecordStoreConnection jdbcConn = new JDBCCertRecordStoreConnection(mockConn);
    SQLException ex = new SQLException("sql-reason", "08S01", 9999);
    ResourceException rEx = (ResourceException) jdbcConn.sqlError(ex, "sqlError");
    assertEquals(ResourceException.INTERNAL_SERVER_ERROR, rEx.getCode());
    
    ex = new SQLException("sql-reason", "40001", 9999);
    rEx = (ResourceException) jdbcConn.sqlError(ex, "sqlError");
    assertEquals(ResourceException.INTERNAL_SERVER_ERROR, rEx.getCode());
    SQLTimeoutException tex = new SQLTimeoutException();
    rEx = (ResourceException) jdbcConn.sqlError(tex, "sqlError");
    assertEquals(ResourceException.SERVICE_UNAVAILABLE, rEx.getCode());
    jdbcConn.close();
}