Home | History | Annotate | Download | only in sql
      1 /*
      2  * Licensed to the Apache Software Foundation (ASF) under one or more
      3  * contributor license agreements. See the NOTICE file distributed with
      4  * this work for additional information regarding copyright ownership.
      5  * The ASF licenses this file to You under the Apache License, Version 2.0
      6  * (the "License"); you may not use this file except in compliance with
      7  * the License. You may obtain a copy of the License at
      8  *
      9  * http://www.apache.org/licenses/LICENSE-2.0
     10  *
     11  * Unless required by applicable law or agreed to in writing, software
     12  * distributed under the License is distributed on an "AS IS" BASIS,
     13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14  * See the License for the specific language governing permissions and
     15  * limitations under the License.
     16  */
     17 
     18 package org.apache.harmony.sql.tests.java.sql;
     19 
     20 import java.sql.SQLNonTransientConnectionException;
     21 
     22 import junit.framework.TestCase;
     23 
     24 import org.apache.harmony.testframework.serialization.SerializationTest;
     25 
     26 public class SQLNonTransientConnectionExceptionTest extends TestCase {
     27 
     28     private SQLNonTransientConnectionException sQLNonTransientConnectionException;
     29 
     30     protected void setUp() throws Exception {
     31         sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
     32                 "MYTESTSTRING", "MYTESTSTRING", 1, new Exception("MYTHROWABLE"));
     33     }
     34 
     35     protected void tearDown() throws Exception {
     36         sQLNonTransientConnectionException = null;
     37     }
     38 
     39     /**
     40      * @test java.sql.SQLNonTransientConnectionException(String)
     41      */
     42     public void test_Constructor_LString() {
     43         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
     44                 "MYTESTSTRING");
     45         assertNotNull(sQLNonTransientConnectionException);
     46         assertNull(
     47                 "The SQLState of SQLNonTransientConnectionException should be null",
     48                 sQLNonTransientConnectionException.getSQLState());
     49         assertEquals(
     50                 "The reason of SQLNonTransientConnectionException set and get should be equivalent",
     51                 "MYTESTSTRING", sQLNonTransientConnectionException.getMessage());
     52         assertEquals(
     53                 "The error code of SQLNonTransientConnectionException should be 0",
     54                 sQLNonTransientConnectionException.getErrorCode(), 0);
     55     }
     56 
     57     /**
     58      * @test java.sql.SQLNonTransientConnectionException(String)
     59      */
     60     public void test_Constructor_LString_1() {
     61         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
     62                 (String) null);
     63         assertNotNull(sQLNonTransientConnectionException);
     64         assertNull(
     65                 "The SQLState of SQLNonTransientConnectionException should be null",
     66                 sQLNonTransientConnectionException.getSQLState());
     67         assertNull(
     68                 "The reason of SQLNonTransientConnectionException should be null",
     69                 sQLNonTransientConnectionException.getMessage());
     70         assertEquals(
     71                 "The error code of SQLNonTransientConnectionException should be 0",
     72                 sQLNonTransientConnectionException.getErrorCode(), 0);
     73     }
     74 
     75     /**
     76      * @test java.sql.SQLNonTransientConnectionException(String, String)
     77      */
     78     public void test_Constructor_LStringLString() {
     79         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
     80                 "MYTESTSTRING1", "MYTESTSTRING2");
     81         assertNotNull(sQLNonTransientConnectionException);
     82         assertEquals(
     83                 "The SQLState of SQLNonTransientConnectionException set and get should be equivalent",
     84                 "MYTESTSTRING2", sQLNonTransientConnectionException
     85                 .getSQLState());
     86         assertEquals(
     87                 "The reason of SQLNonTransientConnectionException set and get should be equivalent",
     88                 "MYTESTSTRING1", sQLNonTransientConnectionException
     89                 .getMessage());
     90         assertEquals(
     91                 "The error code of SQLNonTransientConnectionException should be 0",
     92                 sQLNonTransientConnectionException.getErrorCode(), 0);
     93 
     94     }
     95 
     96     /**
     97      * @test java.sql.SQLNonTransientConnectionException(String, String)
     98      */
     99     public void test_Constructor_LStringLString_1() {
    100         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    101                 "MYTESTSTRING", (String) null);
    102         assertNotNull(sQLNonTransientConnectionException);
    103         assertNull(
    104                 "The SQLState of SQLNonTransientConnectionException should be null",
    105                 sQLNonTransientConnectionException.getSQLState());
    106         assertEquals(
    107                 "The reason of SQLNonTransientConnectionException set and get should be equivalent",
    108                 "MYTESTSTRING", sQLNonTransientConnectionException.getMessage());
    109         assertEquals(
    110                 "The error code of SQLNonTransientConnectionException should be 0",
    111                 sQLNonTransientConnectionException.getErrorCode(), 0);
    112     }
    113 
    114     /**
    115      * @test java.sql.SQLNonTransientConnectionException(String, String)
    116      */
    117     public void test_Constructor_LStringLString_2() {
    118         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    119                 null, "MYTESTSTRING");
    120         assertNotNull(sQLNonTransientConnectionException);
    121         assertEquals(
    122                 "The SQLState of SQLNonTransientConnectionException set and get should be equivalent",
    123                 "MYTESTSTRING", sQLNonTransientConnectionException
    124                 .getSQLState());
    125         assertNull(
    126                 "The reason of SQLNonTransientConnectionException should be null",
    127                 sQLNonTransientConnectionException.getMessage());
    128         assertEquals(
    129                 "The error code of SQLNonTransientConnectionException should be 0",
    130                 sQLNonTransientConnectionException.getErrorCode(), 0);
    131     }
    132 
    133     /**
    134      * @test java.sql.SQLNonTransientConnectionException(String, String)
    135      */
    136     public void test_Constructor_LStringLString_3() {
    137         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    138                 (String) null, (String) null);
    139         assertNotNull(sQLNonTransientConnectionException);
    140         assertNull(
    141                 "The SQLState of SQLNonTransientConnectionException should be null",
    142                 sQLNonTransientConnectionException.getSQLState());
    143         assertNull(
    144                 "The reason of SQLNonTransientConnectionException should be null",
    145                 sQLNonTransientConnectionException.getMessage());
    146         assertEquals(
    147                 "The error code of SQLNonTransientConnectionException should be 0",
    148                 sQLNonTransientConnectionException.getErrorCode(), 0);
    149     }
    150 
    151     /**
    152      * @test java.sql.SQLNonTransientConnectionException(String, String, int)
    153      */
    154     public void test_Constructor_LStringLStringI() {
    155         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    156                 "MYTESTSTRING1", "MYTESTSTRING2", 1);
    157         assertNotNull(sQLNonTransientConnectionException);
    158         assertEquals(
    159                 "The SQLState of SQLNonTransientConnectionException set and get should be equivalent",
    160                 "MYTESTSTRING2", sQLNonTransientConnectionException
    161                 .getSQLState());
    162         assertEquals(
    163                 "The reason of SQLNonTransientConnectionException set and get should be equivalent",
    164                 "MYTESTSTRING1", sQLNonTransientConnectionException
    165                 .getMessage());
    166         assertEquals(
    167                 "The error code of SQLNonTransientConnectionException should be 1",
    168                 sQLNonTransientConnectionException.getErrorCode(), 1);
    169     }
    170 
    171     /**
    172      * @test java.sql.SQLNonTransientConnectionException(String, String, int)
    173      */
    174     public void test_Constructor_LStringLStringI_1() {
    175         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    176                 "MYTESTSTRING1", "MYTESTSTRING2", 0);
    177         assertNotNull(sQLNonTransientConnectionException);
    178         assertEquals(
    179                 "The SQLState of SQLNonTransientConnectionException set and get should be equivalent",
    180                 "MYTESTSTRING2", sQLNonTransientConnectionException
    181                 .getSQLState());
    182         assertEquals(
    183                 "The reason of SQLNonTransientConnectionException set and get should be equivalent",
    184                 "MYTESTSTRING1", sQLNonTransientConnectionException
    185                 .getMessage());
    186         assertEquals(
    187                 "The error code of SQLNonTransientConnectionException should be 0",
    188                 sQLNonTransientConnectionException.getErrorCode(), 0);
    189     }
    190 
    191     /**
    192      * @test java.sql.SQLNonTransientConnectionException(String, String, int)
    193      */
    194     public void test_Constructor_LStringLStringI_2() {
    195         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    196                 "MYTESTSTRING1", "MYTESTSTRING2", -1);
    197         assertNotNull(sQLNonTransientConnectionException);
    198         assertEquals(
    199                 "The SQLState of SQLNonTransientConnectionException set and get should be equivalent",
    200                 "MYTESTSTRING2", sQLNonTransientConnectionException
    201                 .getSQLState());
    202         assertEquals(
    203                 "The reason of SQLNonTransientConnectionException set and get should be equivalent",
    204                 "MYTESTSTRING1", sQLNonTransientConnectionException
    205                 .getMessage());
    206         assertEquals(
    207                 "The error code of SQLNonTransientConnectionException should be -1",
    208                 sQLNonTransientConnectionException.getErrorCode(), -1);
    209     }
    210 
    211     /**
    212      * @test java.sql.SQLNonTransientConnectionException(String, String, int)
    213      */
    214     public void test_Constructor_LStringLStringI_3() {
    215         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    216                 "MYTESTSTRING", null, 1);
    217         assertNotNull(sQLNonTransientConnectionException);
    218         assertNull(
    219                 "The SQLState of SQLNonTransientConnectionException should be null",
    220                 sQLNonTransientConnectionException.getSQLState());
    221         assertEquals(
    222                 "The reason of SQLNonTransientConnectionException set and get should be equivalent",
    223                 "MYTESTSTRING", sQLNonTransientConnectionException.getMessage());
    224         assertEquals(
    225                 "The error code of SQLNonTransientConnectionException should be 1",
    226                 sQLNonTransientConnectionException.getErrorCode(), 1);
    227     }
    228 
    229     /**
    230      * @test java.sql.SQLNonTransientConnectionException(String, String, int)
    231      */
    232     public void test_Constructor_LStringLStringI_4() {
    233         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    234                 "MYTESTSTRING", null, 0);
    235         assertNotNull(sQLNonTransientConnectionException);
    236         assertNull(
    237                 "The SQLState of SQLNonTransientConnectionException should be null",
    238                 sQLNonTransientConnectionException.getSQLState());
    239         assertEquals(
    240                 "The reason of SQLNonTransientConnectionException set and get should be equivalent",
    241                 "MYTESTSTRING", sQLNonTransientConnectionException.getMessage());
    242         assertEquals(
    243                 "The error code of SQLNonTransientConnectionException should be 0",
    244                 sQLNonTransientConnectionException.getErrorCode(), 0);
    245     }
    246 
    247     /**
    248      * @test java.sql.SQLNonTransientConnectionException(String, String, int)
    249      */
    250     public void test_Constructor_LStringLStringI_5() {
    251         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    252                 "MYTESTSTRING", null, -1);
    253         assertNotNull(sQLNonTransientConnectionException);
    254         assertNull(
    255                 "The SQLState of SQLNonTransientConnectionException should be null",
    256                 sQLNonTransientConnectionException.getSQLState());
    257         assertEquals(
    258                 "The reason of SQLNonTransientConnectionException set and get should be equivalent",
    259                 "MYTESTSTRING", sQLNonTransientConnectionException.getMessage());
    260         assertEquals(
    261                 "The error code of SQLNonTransientConnectionException should be -1",
    262                 sQLNonTransientConnectionException.getErrorCode(), -1);
    263     }
    264 
    265     /**
    266      * @test java.sql.SQLNonTransientConnectionException(String, String, int)
    267      */
    268     public void test_Constructor_LStringLStringI_6() {
    269         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    270                 null, "MYTESTSTRING", 1);
    271         assertNotNull(sQLNonTransientConnectionException);
    272         assertEquals(
    273                 "The SQLState of SQLNonTransientConnectionException set and get should be equivalent",
    274                 "MYTESTSTRING", sQLNonTransientConnectionException
    275                 .getSQLState());
    276         assertNull(
    277                 "The reason of SQLNonTransientConnectionException should be null",
    278                 sQLNonTransientConnectionException.getMessage());
    279         assertEquals(
    280                 "The error code of SQLNonTransientConnectionException should be 1",
    281                 sQLNonTransientConnectionException.getErrorCode(), 1);
    282     }
    283 
    284     /**
    285      * @test java.sql.SQLNonTransientConnectionException(String, String, int)
    286      */
    287     public void test_Constructor_LStringLStringI_7() {
    288         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    289                 null, "MYTESTSTRING", 0);
    290         assertNotNull(sQLNonTransientConnectionException);
    291         assertEquals(
    292                 "The SQLState of SQLNonTransientConnectionException set and get should be equivalent",
    293                 "MYTESTSTRING", sQLNonTransientConnectionException
    294                 .getSQLState());
    295         assertNull(
    296                 "The reason of SQLNonTransientConnectionException should be null",
    297                 sQLNonTransientConnectionException.getMessage());
    298         assertEquals(
    299                 "The error code of SQLNonTransientConnectionException should be 0",
    300                 sQLNonTransientConnectionException.getErrorCode(), 0);
    301     }
    302 
    303     /**
    304      * @test java.sql.SQLNonTransientConnectionException(String, String, int)
    305      */
    306     public void test_Constructor_LStringLStringI_8() {
    307         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    308                 null, "MYTESTSTRING", -1);
    309         assertNotNull(sQLNonTransientConnectionException);
    310         assertEquals(
    311                 "The SQLState of SQLNonTransientConnectionException set and get should be equivalent",
    312                 "MYTESTSTRING", sQLNonTransientConnectionException
    313                 .getSQLState());
    314         assertNull(
    315                 "The reason of SQLNonTransientConnectionException should be null",
    316                 sQLNonTransientConnectionException.getMessage());
    317         assertEquals(
    318                 "The error code of SQLNonTransientConnectionException should be -1",
    319                 sQLNonTransientConnectionException.getErrorCode(), -1);
    320     }
    321 
    322     /**
    323      * @test java.sql.SQLNonTransientConnectionException(String, String, int)
    324      */
    325     public void test_Constructor_LStringLStringI_9() {
    326         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    327                 null, null, 1);
    328         assertNotNull(sQLNonTransientConnectionException);
    329         assertNull(
    330                 "The SQLState of SQLNonTransientConnectionException should be null",
    331                 sQLNonTransientConnectionException.getSQLState());
    332         assertNull(
    333                 "The reason of SQLNonTransientConnectionException should be null",
    334                 sQLNonTransientConnectionException.getMessage());
    335         assertEquals(
    336                 "The error code of SQLNonTransientConnectionException should be 1",
    337                 sQLNonTransientConnectionException.getErrorCode(), 1);
    338     }
    339 
    340     /**
    341      * @test java.sql.SQLNonTransientConnectionException(String, String, int)
    342      */
    343     public void test_Constructor_LStringLStringI_10() {
    344         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    345                 null, null, 0);
    346         assertNotNull(sQLNonTransientConnectionException);
    347         assertNull(
    348                 "The SQLState of SQLNonTransientConnectionException should be null",
    349                 sQLNonTransientConnectionException.getSQLState());
    350         assertNull(
    351                 "The reason of SQLNonTransientConnectionException should be null",
    352                 sQLNonTransientConnectionException.getMessage());
    353         assertEquals(
    354                 "The error code of SQLNonTransientConnectionException should be 0",
    355                 sQLNonTransientConnectionException.getErrorCode(), 0);
    356     }
    357 
    358     /**
    359      * @test java.sql.SQLNonTransientConnectionException(String, String, int)
    360      */
    361     public void test_Constructor_LStringLStringI_11() {
    362         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    363                 null, null, -1);
    364         assertNotNull(sQLNonTransientConnectionException);
    365         assertNull(
    366                 "The SQLState of SQLNonTransientConnectionException should be null",
    367                 sQLNonTransientConnectionException.getSQLState());
    368         assertNull(
    369                 "The reason of SQLNonTransientConnectionException should be null",
    370                 sQLNonTransientConnectionException.getMessage());
    371         assertEquals(
    372                 "The error code of SQLNonTransientConnectionException should be -1",
    373                 sQLNonTransientConnectionException.getErrorCode(), -1);
    374     }
    375 
    376     /**
    377      * @test java.sql.SQLNonTransientConnectionException(Throwable)
    378      */
    379     public void test_Constructor_LThrowable() {
    380         Throwable cause = new Exception("MYTHROWABLE");
    381         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    382                 cause);
    383         assertNotNull(sQLNonTransientConnectionException);
    384         assertEquals(
    385                 "The reason of SQLNonTransientConnectionException should be equals to cause.toString()",
    386                 "java.lang.Exception: MYTHROWABLE",
    387                 sQLNonTransientConnectionException.getMessage());
    388         assertNull(
    389                 "The SQLState of SQLNonTransientConnectionException should be null",
    390                 sQLNonTransientConnectionException.getSQLState());
    391         assertEquals(
    392                 "The error code of SQLNonTransientConnectionException should be 0",
    393                 sQLNonTransientConnectionException.getErrorCode(), 0);
    394         assertEquals(
    395                 "The cause of SQLNonTransientConnectionException set and get should be equivalent",
    396                 cause, sQLNonTransientConnectionException.getCause());
    397     }
    398 
    399     /**
    400      * @test java.sql.SQLNonTransientConnectionException(Throwable)
    401      */
    402     public void test_Constructor_LThrowable_1() {
    403         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    404                 (Throwable) null);
    405         assertNotNull(sQLNonTransientConnectionException);
    406         assertNull(
    407                 "The SQLState of SQLNonTransientConnectionException should be null",
    408                 sQLNonTransientConnectionException.getSQLState());
    409         assertNull(
    410                 "The reason of SQLNonTransientConnectionException should be null",
    411                 sQLNonTransientConnectionException.getMessage());
    412         assertEquals(
    413                 "The error code of SQLNonTransientConnectionException should be 0",
    414                 sQLNonTransientConnectionException.getErrorCode(), 0);
    415         assertNull(
    416                 "The cause of SQLNonTransientConnectionException should be null",
    417                 sQLNonTransientConnectionException.getCause());
    418     }
    419 
    420     /**
    421      * @test java.sql.SQLNonTransientConnectionException(String, Throwable)
    422      */
    423     public void test_Constructor_LStringLThrowable() {
    424         Throwable cause = new Exception("MYTHROWABLE");
    425         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    426                 "MYTESTSTRING", cause);
    427         assertNotNull(sQLNonTransientConnectionException);
    428         assertEquals(
    429                 "The reason of SQLNonTransientConnectionException set and get should be equivalent",
    430                 "MYTESTSTRING", sQLNonTransientConnectionException.getMessage());
    431         assertNull(
    432                 "The SQLState of SQLNonTransientConnectionException should be null",
    433                 sQLNonTransientConnectionException.getSQLState());
    434         assertEquals(
    435                 "The error code of SQLNonTransientConnectionException should be 0",
    436                 sQLNonTransientConnectionException.getErrorCode(), 0);
    437         assertEquals(
    438                 "The cause of SQLNonTransientConnectionException set and get should be equivalent",
    439                 cause, sQLNonTransientConnectionException.getCause());
    440     }
    441 
    442     /**
    443      * @test java.sql.SQLNonTransientConnectionException(String, Throwable)
    444      */
    445     public void test_Constructor_LStringLThrowable_1() {
    446         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    447                 "MYTESTSTRING", (Throwable) null);
    448         assertNotNull(sQLNonTransientConnectionException);
    449         assertEquals(
    450                 "The reason of SQLNonTransientConnectionException set and get should be equivalent",
    451                 "MYTESTSTRING", sQLNonTransientConnectionException.getMessage());
    452         assertNull(
    453                 "The SQLState of SQLNonTransientConnectionException should be null",
    454                 sQLNonTransientConnectionException.getSQLState());
    455         assertEquals(
    456                 "The error code of SQLNonTransientConnectionException should be 0",
    457                 sQLNonTransientConnectionException.getErrorCode(), 0);
    458         assertNull(
    459                 "The cause of SQLNonTransientConnectionException should be null",
    460                 sQLNonTransientConnectionException.getCause());
    461     }
    462 
    463     /**
    464      * @test java.sql.SQLNonTransientConnectionException(String, Throwable)
    465      */
    466     public void test_Constructor_LStringLThrowable_2() {
    467         Throwable cause = new Exception("MYTHROWABLE");
    468         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    469                 null, cause);
    470         assertNotNull(sQLNonTransientConnectionException);
    471         assertNull(
    472                 "The reason of SQLNonTransientConnectionException should be null",
    473                 sQLNonTransientConnectionException.getMessage());
    474         assertNull(
    475                 "The SQLState of SQLNonTransientConnectionException should be null",
    476                 sQLNonTransientConnectionException.getSQLState());
    477         assertEquals(
    478                 "The error code of SQLNonTransientConnectionException should be 0",
    479                 sQLNonTransientConnectionException.getErrorCode(), 0);
    480     }
    481 
    482     /**
    483      * @test java.sql.SQLNonTransientConnectionException(String, Throwable)
    484      */
    485     public void test_Constructor_LStringLThrowable_3() {
    486         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    487                 (String) null, (Throwable) null);
    488         assertNotNull(sQLNonTransientConnectionException);
    489         assertNull(
    490                 "The SQLState of SQLNonTransientConnectionException should be null",
    491                 sQLNonTransientConnectionException.getSQLState());
    492         assertNull(
    493                 "The reason of SQLNonTransientConnectionException should be null",
    494                 sQLNonTransientConnectionException.getMessage());
    495         assertEquals(
    496                 "The error code of SQLNonTransientConnectionException should be 0",
    497                 sQLNonTransientConnectionException.getErrorCode(), 0);
    498         assertNull(
    499                 "The cause of SQLNonTransientConnectionException should be null",
    500                 sQLNonTransientConnectionException.getCause());
    501     }
    502 
    503     /**
    504      * @test java.sql.SQLNonTransientConnectionException(String, String,
    505      *Throwable)
    506      */
    507     public void test_Constructor_LStringLStringLThrowable() {
    508         Throwable cause = new Exception("MYTHROWABLE");
    509         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    510                 "MYTESTSTRING1", "MYTESTSTRING2", cause);
    511         assertNotNull(sQLNonTransientConnectionException);
    512         assertEquals(
    513                 "The SQLState of SQLNonTransientConnectionException set and get should be equivalent",
    514                 "MYTESTSTRING2", sQLNonTransientConnectionException
    515                 .getSQLState());
    516         assertEquals(
    517                 "The reason of SQLNonTransientConnectionException set and get should be equivalent",
    518                 "MYTESTSTRING1", sQLNonTransientConnectionException
    519                 .getMessage());
    520         assertEquals(
    521                 "The error code of SQLNonTransientConnectionException should be 0",
    522                 sQLNonTransientConnectionException.getErrorCode(), 0);
    523         assertEquals(
    524                 "The cause of SQLNonTransientConnectionException set and get should be equivalent",
    525                 cause, sQLNonTransientConnectionException.getCause());
    526     }
    527 
    528     /**
    529      * @test java.sql.SQLNonTransientConnectionException(String, String,
    530      *Throwable)
    531      */
    532     public void test_Constructor_LStringLStringLThrowable_1() {
    533         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    534                 "MYTESTSTRING1", "MYTESTSTRING2", null);
    535         assertNotNull(sQLNonTransientConnectionException);
    536         assertEquals(
    537                 "The SQLState of SQLNonTransientConnectionException set and get should be equivalent",
    538                 "MYTESTSTRING2", sQLNonTransientConnectionException
    539                 .getSQLState());
    540         assertEquals(
    541                 "The reason of SQLNonTransientConnectionException set and get should be equivalent",
    542                 "MYTESTSTRING1", sQLNonTransientConnectionException
    543                 .getMessage());
    544         assertEquals(
    545                 "The error code of SQLNonTransientConnectionException should be 0",
    546                 sQLNonTransientConnectionException.getErrorCode(), 0);
    547         assertNull(
    548                 "The cause of SQLNonTransientConnectionException should be null",
    549                 sQLNonTransientConnectionException.getCause());
    550     }
    551 
    552     /**
    553      * @test java.sql.SQLNonTransientConnectionException(String, String,
    554      *Throwable)
    555      */
    556     public void test_Constructor_LStringLStringLThrowable_2() {
    557         Throwable cause = new Exception("MYTHROWABLE");
    558         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    559                 "MYTESTSTRING", null, cause);
    560         assertNotNull(sQLNonTransientConnectionException);
    561         assertNull(
    562                 "The SQLState of SQLNonTransientConnectionException should be null",
    563                 sQLNonTransientConnectionException.getSQLState());
    564         assertEquals(
    565                 "The reason of SQLNonTransientConnectionException set and get should be equivalent",
    566                 "MYTESTSTRING", sQLNonTransientConnectionException.getMessage());
    567         assertEquals(
    568                 "The error code of SQLNonTransientConnectionException should be 0",
    569                 sQLNonTransientConnectionException.getErrorCode(), 0);
    570         assertEquals(
    571                 "The cause of SQLNonTransientConnectionException set and get should be equivalent",
    572                 cause, sQLNonTransientConnectionException.getCause());
    573     }
    574 
    575     /**
    576      * @test java.sql.SQLNonTransientConnectionException(String, String,
    577      *Throwable)
    578      */
    579     public void test_Constructor_LStringLStringLThrowable_3() {
    580         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    581                 "MYTESTSTRING", null, null);
    582         assertNotNull(sQLNonTransientConnectionException);
    583         assertNull(
    584                 "The SQLState of SQLNonTransientConnectionException should be null",
    585                 sQLNonTransientConnectionException.getSQLState());
    586         assertEquals(
    587                 "The reason of SQLNonTransientConnectionException set and get should be equivalent",
    588                 "MYTESTSTRING", sQLNonTransientConnectionException.getMessage());
    589         assertEquals(
    590                 "The error code of SQLNonTransientConnectionException should be 0",
    591                 sQLNonTransientConnectionException.getErrorCode(), 0);
    592         assertNull(
    593                 "The cause of SQLNonTransientConnectionException should be null",
    594                 sQLNonTransientConnectionException.getCause());
    595     }
    596 
    597     /**
    598      * @test java.sql.SQLNonTransientConnectionException(String, String,
    599      *Throwable)
    600      */
    601     public void test_Constructor_LStringLStringLThrowable_4() {
    602         Throwable cause = new Exception("MYTHROWABLE");
    603         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    604                 null, "MYTESTSTRING", cause);
    605         assertNotNull(sQLNonTransientConnectionException);
    606         assertEquals(
    607                 "The SQLState of SQLNonTransientConnectionException set and get should be equivalent",
    608                 "MYTESTSTRING", sQLNonTransientConnectionException
    609                 .getSQLState());
    610         assertNull(
    611                 "The reason of SQLNonTransientConnectionException should be null",
    612                 sQLNonTransientConnectionException.getMessage());
    613         assertEquals(
    614                 "The error code of SQLNonTransientConnectionException should be 0",
    615                 sQLNonTransientConnectionException.getErrorCode(), 0);
    616         assertEquals(
    617                 "The cause of SQLNonTransientConnectionException set and get should be equivalent",
    618                 cause, sQLNonTransientConnectionException.getCause());
    619     }
    620 
    621     /**
    622      * @test java.sql.SQLNonTransientConnectionException(String, String,
    623      *Throwable)
    624      */
    625     public void test_Constructor_LStringLStringLThrowable_5() {
    626         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    627                 null, "MYTESTSTRING", null);
    628         assertNotNull(sQLNonTransientConnectionException);
    629         assertEquals(
    630                 "The SQLState of SQLNonTransientConnectionException set and get should be equivalent",
    631                 "MYTESTSTRING", sQLNonTransientConnectionException
    632                 .getSQLState());
    633         assertNull(
    634                 "The reason of SQLNonTransientConnectionException should be null",
    635                 sQLNonTransientConnectionException.getMessage());
    636         assertEquals(
    637                 "The error code of SQLNonTransientConnectionException should be 0",
    638                 sQLNonTransientConnectionException.getErrorCode(), 0);
    639         assertNull(
    640                 "The cause of SQLNonTransientConnectionException should be null",
    641                 sQLNonTransientConnectionException.getCause());
    642     }
    643 
    644     /**
    645      * @test java.sql.SQLNonTransientConnectionException(String, String,
    646      *Throwable)
    647      */
    648     public void test_Constructor_LStringLStringLThrowable_6() {
    649         Throwable cause = new Exception("MYTHROWABLE");
    650         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    651                 null, null, cause);
    652         assertNotNull(sQLNonTransientConnectionException);
    653         assertNull(
    654                 "The SQLState of SQLNonTransientConnectionException should be null",
    655                 sQLNonTransientConnectionException.getSQLState());
    656         assertNull(
    657                 "The reason of SQLNonTransientConnectionException should be null",
    658                 sQLNonTransientConnectionException.getMessage());
    659         assertEquals(
    660                 "The error code of SQLNonTransientConnectionException should be 0",
    661                 sQLNonTransientConnectionException.getErrorCode(), 0);
    662         assertEquals(
    663                 "The cause of SQLNonTransientConnectionException set and get should be equivalent",
    664                 cause, sQLNonTransientConnectionException.getCause());
    665     }
    666 
    667     /**
    668      * @test java.sql.SQLNonTransientConnectionException(String, String,
    669      *Throwable)
    670      */
    671     public void test_Constructor_LStringLStringLThrowable_7() {
    672         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    673                 null, null, null);
    674         assertNotNull(sQLNonTransientConnectionException);
    675         assertNull(
    676                 "The SQLState of SQLNonTransientConnectionException should be null",
    677                 sQLNonTransientConnectionException.getSQLState());
    678         assertNull(
    679                 "The reason of SQLNonTransientConnectionException should be null",
    680                 sQLNonTransientConnectionException.getMessage());
    681         assertEquals(
    682                 "The error code of SQLNonTransientConnectionException should be 0",
    683                 sQLNonTransientConnectionException.getErrorCode(), 0);
    684         assertNull(
    685                 "The cause of SQLNonTransientConnectionException should be null",
    686                 sQLNonTransientConnectionException.getCause());
    687     }
    688 
    689     /**
    690      * @test java.sql.SQLNonTransientConnectionException(String, String, int,
    691      *Throwable)
    692      */
    693     public void test_Constructor_LStringLStringILThrowable() {
    694         Throwable cause = new Exception("MYTHROWABLE");
    695         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    696                 "MYTESTSTRING1", "MYTESTSTRING2", 1, cause);
    697         assertNotNull(sQLNonTransientConnectionException);
    698         assertEquals(
    699                 "The SQLState of SQLNonTransientConnectionException set and get should be equivalent",
    700                 "MYTESTSTRING2", sQLNonTransientConnectionException
    701                 .getSQLState());
    702         assertEquals(
    703                 "The reason of SQLNonTransientConnectionException set and get should be equivalent",
    704                 "MYTESTSTRING1", sQLNonTransientConnectionException
    705                 .getMessage());
    706         assertEquals(
    707                 "The error code of SQLNonTransientConnectionException should be 1",
    708                 sQLNonTransientConnectionException.getErrorCode(), 1);
    709         assertEquals(
    710                 "The cause of SQLNonTransientConnectionException set and get should be equivalent",
    711                 cause, sQLNonTransientConnectionException.getCause());
    712     }
    713 
    714     /**
    715      * @test java.sql.SQLNonTransientConnectionException(String, String, int,
    716      *Throwable)
    717      */
    718     public void test_Constructor_LStringLStringILThrowable_1() {
    719         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    720                 "MYTESTSTRING1", "MYTESTSTRING2", 1, null);
    721         assertNotNull(sQLNonTransientConnectionException);
    722         assertEquals(
    723                 "The SQLState of SQLNonTransientConnectionException set and get should be equivalent",
    724                 "MYTESTSTRING2", sQLNonTransientConnectionException
    725                 .getSQLState());
    726         assertEquals(
    727                 "The reason of SQLNonTransientConnectionException set and get should be equivalent",
    728                 "MYTESTSTRING1", sQLNonTransientConnectionException
    729                 .getMessage());
    730         assertEquals(
    731                 "The error code of SQLNonTransientConnectionException should be 1",
    732                 sQLNonTransientConnectionException.getErrorCode(), 1);
    733         assertNull(
    734                 "The cause of SQLNonTransientConnectionException should be null",
    735                 sQLNonTransientConnectionException.getCause());
    736     }
    737 
    738     /**
    739      * @test java.sql.SQLNonTransientConnectionException(String, String, int,
    740      *Throwable)
    741      */
    742     public void test_Constructor_LStringLStringILThrowable_2() {
    743         Throwable cause = new Exception("MYTHROWABLE");
    744         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    745                 "MYTESTSTRING1", "MYTESTSTRING2", 0, cause);
    746         assertNotNull(sQLNonTransientConnectionException);
    747         assertEquals(
    748                 "The SQLState of SQLNonTransientConnectionException set and get should be equivalent",
    749                 "MYTESTSTRING2", sQLNonTransientConnectionException
    750                 .getSQLState());
    751         assertEquals(
    752                 "The reason of SQLNonTransientConnectionException set and get should be equivalent",
    753                 "MYTESTSTRING1", sQLNonTransientConnectionException
    754                 .getMessage());
    755         assertEquals(
    756                 "The error code of SQLNonTransientConnectionException should be 0",
    757                 sQLNonTransientConnectionException.getErrorCode(), 0);
    758         assertEquals(
    759                 "The cause of SQLNonTransientConnectionException set and get should be equivalent",
    760                 cause, sQLNonTransientConnectionException.getCause());
    761     }
    762 
    763     /**
    764      * @test java.sql.SQLNonTransientConnectionException(String, String, int,
    765      *Throwable)
    766      */
    767     public void test_Constructor_LStringLStringILThrowable_3() {
    768         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    769                 "MYTESTSTRING1", "MYTESTSTRING2", 0, null);
    770         assertNotNull(sQLNonTransientConnectionException);
    771         assertEquals(
    772                 "The SQLState of SQLNonTransientConnectionException set and get should be equivalent",
    773                 "MYTESTSTRING2", sQLNonTransientConnectionException
    774                 .getSQLState());
    775         assertEquals(
    776                 "The reason of SQLNonTransientConnectionException set and get should be equivalent",
    777                 "MYTESTSTRING1", sQLNonTransientConnectionException
    778                 .getMessage());
    779         assertEquals(
    780                 "The error code of SQLNonTransientConnectionException should be 0",
    781                 sQLNonTransientConnectionException.getErrorCode(), 0);
    782         assertNull(
    783                 "The cause of SQLNonTransientConnectionException should be null",
    784                 sQLNonTransientConnectionException.getCause());
    785     }
    786 
    787     /**
    788      * @test java.sql.SQLNonTransientConnectionException(String, String, int,
    789      *Throwable)
    790      */
    791     public void test_Constructor_LStringLStringILThrowable_4() {
    792         Throwable cause = new Exception("MYTHROWABLE");
    793         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    794                 "MYTESTSTRING1", "MYTESTSTRING2", -1, cause);
    795         assertNotNull(sQLNonTransientConnectionException);
    796         assertEquals(
    797                 "The SQLState of SQLNonTransientConnectionException set and get should be equivalent",
    798                 "MYTESTSTRING2", sQLNonTransientConnectionException
    799                 .getSQLState());
    800         assertEquals(
    801                 "The reason of SQLNonTransientConnectionException set and get should be equivalent",
    802                 "MYTESTSTRING1", sQLNonTransientConnectionException
    803                 .getMessage());
    804         assertEquals(
    805                 "The error code of SQLNonTransientConnectionException should be -1",
    806                 sQLNonTransientConnectionException.getErrorCode(), -1);
    807         assertEquals(
    808                 "The cause of SQLNonTransientConnectionException set and get should be equivalent",
    809                 cause, sQLNonTransientConnectionException.getCause());
    810     }
    811 
    812     /**
    813      * @test java.sql.SQLNonTransientConnectionException(String, String, int,
    814      *Throwable)
    815      */
    816     public void test_Constructor_LStringLStringILThrowable_5() {
    817         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    818                 "MYTESTSTRING1", "MYTESTSTRING2", -1, null);
    819         assertNotNull(sQLNonTransientConnectionException);
    820         assertEquals(
    821                 "The SQLState of SQLNonTransientConnectionException set and get should be equivalent",
    822                 "MYTESTSTRING2", sQLNonTransientConnectionException
    823                 .getSQLState());
    824         assertEquals(
    825                 "The reason of SQLNonTransientConnectionException set and get should be equivalent",
    826                 "MYTESTSTRING1", sQLNonTransientConnectionException
    827                 .getMessage());
    828         assertEquals(
    829                 "The error code of SQLNonTransientConnectionException should be -1",
    830                 sQLNonTransientConnectionException.getErrorCode(), -1);
    831         assertNull(
    832                 "The cause of SQLNonTransientConnectionException should be null",
    833                 sQLNonTransientConnectionException.getCause());
    834 
    835     }
    836 
    837     /**
    838      * @test java.sql.SQLNonTransientConnectionException(String, String, int,
    839      *Throwable)
    840      */
    841     public void test_Constructor_LStringLStringILThrowable_6() {
    842         Throwable cause = new Exception("MYTHROWABLE");
    843         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    844                 "MYTESTSTRING", null, 1, cause);
    845         assertNotNull(sQLNonTransientConnectionException);
    846         assertNull(
    847                 "The SQLState of SQLNonTransientConnectionException should be null",
    848                 sQLNonTransientConnectionException.getSQLState());
    849         assertEquals(
    850                 "The reason of SQLNonTransientConnectionException set and get should be equivalent",
    851                 "MYTESTSTRING", sQLNonTransientConnectionException.getMessage());
    852         assertEquals(
    853                 "The error code of SQLNonTransientConnectionException should be 1",
    854                 sQLNonTransientConnectionException.getErrorCode(), 1);
    855         assertEquals(
    856                 "The cause of SQLNonTransientConnectionException set and get should be equivalent",
    857                 cause, sQLNonTransientConnectionException.getCause());
    858     }
    859 
    860     /**
    861      * @test java.sql.SQLNonTransientConnectionException(String, String, int,
    862      *Throwable)
    863      */
    864     public void test_Constructor_LStringLStringILThrowable_7() {
    865         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    866                 "MYTESTSTRING", null, 1, null);
    867         assertNotNull(sQLNonTransientConnectionException);
    868         assertNotNull(sQLNonTransientConnectionException);
    869         assertNull(
    870                 "The SQLState of SQLNonTransientConnectionException should be null",
    871                 sQLNonTransientConnectionException.getSQLState());
    872         assertEquals(
    873                 "The reason of SQLNonTransientConnectionException set and get should be equivalent",
    874                 "MYTESTSTRING", sQLNonTransientConnectionException.getMessage());
    875         assertEquals(
    876                 "The error code of SQLNonTransientConnectionException should be 1",
    877                 sQLNonTransientConnectionException.getErrorCode(), 1);
    878         assertNull(
    879                 "The cause of SQLNonTransientConnectionException should be null",
    880                 sQLNonTransientConnectionException.getCause());
    881     }
    882 
    883     /**
    884      * @test java.sql.SQLNonTransientConnectionException(String, String, int,
    885      *Throwable)
    886      */
    887     public void test_Constructor_LStringLStringILThrowable_8() {
    888         Throwable cause = new Exception("MYTHROWABLE");
    889         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    890                 "MYTESTSTRING", null, 0, cause);
    891         assertNotNull(sQLNonTransientConnectionException);
    892         assertNull(
    893                 "The SQLState of SQLNonTransientConnectionException should be null",
    894                 sQLNonTransientConnectionException.getSQLState());
    895         assertEquals(
    896                 "The reason of SQLNonTransientConnectionException set and get should be equivalent",
    897                 "MYTESTSTRING", sQLNonTransientConnectionException.getMessage());
    898         assertEquals(
    899                 "The error code of SQLNonTransientConnectionException should be 0",
    900                 sQLNonTransientConnectionException.getErrorCode(), 0);
    901         assertEquals(
    902                 "The cause of SQLNonTransientConnectionException set and get should be equivalent",
    903                 cause, sQLNonTransientConnectionException.getCause());
    904     }
    905 
    906     /**
    907      * @test java.sql.SQLNonTransientConnectionException(String, String, int,
    908      *Throwable)
    909      */
    910     public void test_Constructor_LStringLStringILThrowable_9() {
    911         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    912                 "MYTESTSTRING", null, 0, null);
    913         assertNotNull(sQLNonTransientConnectionException);
    914         assertNull(
    915                 "The SQLState of SQLNonTransientConnectionException should be null",
    916                 sQLNonTransientConnectionException.getSQLState());
    917         assertEquals(
    918                 "The reason of SQLNonTransientConnectionException set and get should be equivalent",
    919                 "MYTESTSTRING", sQLNonTransientConnectionException.getMessage());
    920         assertEquals(
    921                 "The error code of SQLNonTransientConnectionException should be 0",
    922                 sQLNonTransientConnectionException.getErrorCode(), 0);
    923         assertNull(
    924                 "The cause of SQLNonTransientConnectionException should be null",
    925                 sQLNonTransientConnectionException.getCause());
    926     }
    927 
    928     /**
    929      * @test java.sql.SQLNonTransientConnectionException(String, String, int,
    930      *Throwable)
    931      */
    932     public void test_Constructor_LStringLStringILThrowable_10() {
    933         Throwable cause = new Exception("MYTHROWABLE");
    934         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    935                 "MYTESTSTRING", null, -1, cause);
    936         assertNotNull(sQLNonTransientConnectionException);
    937         assertNull(
    938                 "The SQLState of SQLNonTransientConnectionException should be null",
    939                 sQLNonTransientConnectionException.getSQLState());
    940         assertEquals(
    941                 "The reason of SQLNonTransientConnectionException set and get should be equivalent",
    942                 "MYTESTSTRING", sQLNonTransientConnectionException.getMessage());
    943         assertEquals(
    944                 "The error code of SQLNonTransientConnectionException should be -1",
    945                 sQLNonTransientConnectionException.getErrorCode(), -1);
    946         assertEquals(
    947                 "The cause of SQLNonTransientConnectionException set and get should be equivalent",
    948                 cause, sQLNonTransientConnectionException.getCause());
    949     }
    950 
    951     /**
    952      * @test java.sql.SQLNonTransientConnectionException(String, String, int,
    953      *Throwable)
    954      */
    955     public void test_Constructor_LStringLStringILThrowable_11() {
    956         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    957                 "MYTESTSTRING", null, -1, null);
    958         assertNotNull(sQLNonTransientConnectionException);
    959         assertNull(
    960                 "The SQLState of SQLNonTransientConnectionException should be null",
    961                 sQLNonTransientConnectionException.getSQLState());
    962         assertEquals(
    963                 "The reason of SQLNonTransientConnectionException set and get should be equivalent",
    964                 "MYTESTSTRING", sQLNonTransientConnectionException.getMessage());
    965         assertEquals(
    966                 "The error code of SQLNonTransientConnectionException should be -1",
    967                 sQLNonTransientConnectionException.getErrorCode(), -1);
    968         assertNull(
    969                 "The cause of SQLNonTransientConnectionException should be null",
    970                 sQLNonTransientConnectionException.getCause());
    971     }
    972 
    973     /**
    974      * @test java.sql.SQLNonTransientConnectionException(String, String, int,
    975      *Throwable)
    976      */
    977     public void test_Constructor_LStringLStringILThrowable_12() {
    978         Throwable cause = new Exception("MYTHROWABLE");
    979         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
    980                 null, "MYTESTSTRING", 1, cause);
    981         assertNotNull(sQLNonTransientConnectionException);
    982         assertEquals(
    983                 "The SQLState of SQLNonTransientConnectionException set and get should be equivalent",
    984                 "MYTESTSTRING", sQLNonTransientConnectionException
    985                 .getSQLState());
    986         assertNull(
    987                 "The reason of SQLNonTransientConnectionException should be null",
    988                 sQLNonTransientConnectionException.getMessage());
    989         assertEquals(
    990                 "The error code of SQLNonTransientConnectionException should be 1",
    991                 sQLNonTransientConnectionException.getErrorCode(), 1);
    992         assertEquals(
    993                 "The cause of SQLNonTransientConnectionException set and get should be equivalent",
    994                 cause, sQLNonTransientConnectionException.getCause());
    995     }
    996 
    997     /**
    998      * @test java.sql.SQLNonTransientConnectionException(String, String, int,
    999      *Throwable)
   1000      */
   1001     public void test_Constructor_LStringLStringILThrowable_13() {
   1002         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
   1003                 null, "MYTESTSTRING", 1, null);
   1004         assertNotNull(sQLNonTransientConnectionException);
   1005         assertEquals(
   1006                 "The SQLState of SQLNonTransientConnectionException set and get should be equivalent",
   1007                 "MYTESTSTRING", sQLNonTransientConnectionException
   1008                 .getSQLState());
   1009         assertNull(
   1010                 "The reason of SQLNonTransientConnectionException should be null",
   1011                 sQLNonTransientConnectionException.getMessage());
   1012         assertEquals(
   1013                 "The error code of SQLNonTransientConnectionException should be 1",
   1014                 sQLNonTransientConnectionException.getErrorCode(), 1);
   1015         assertNull(
   1016                 "The cause of SQLNonTransientConnectionException should be null",
   1017                 sQLNonTransientConnectionException.getCause());
   1018     }
   1019 
   1020     /**
   1021      * @test java.sql.SQLNonTransientConnectionException(String, String, int,
   1022      *Throwable)
   1023      */
   1024     public void test_Constructor_LStringLStringILThrowable_14() {
   1025         Throwable cause = new Exception("MYTHROWABLE");
   1026         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
   1027                 null, "MYTESTSTRING", 0, cause);
   1028         assertNotNull(sQLNonTransientConnectionException);
   1029         assertEquals(
   1030                 "The SQLState of SQLNonTransientConnectionException set and get should be equivalent",
   1031                 "MYTESTSTRING", sQLNonTransientConnectionException
   1032                 .getSQLState());
   1033         assertNull(
   1034                 "The reason of SQLNonTransientConnectionException should be null",
   1035                 sQLNonTransientConnectionException.getMessage());
   1036         assertEquals(
   1037                 "The error code of SQLNonTransientConnectionException should be 0",
   1038                 sQLNonTransientConnectionException.getErrorCode(), 0);
   1039         assertEquals(
   1040                 "The cause of SQLNonTransientConnectionException set and get should be equivalent",
   1041                 cause, sQLNonTransientConnectionException.getCause());
   1042     }
   1043 
   1044     /**
   1045      * @test java.sql.SQLNonTransientConnectionException(String, String, int,
   1046      *Throwable)
   1047      */
   1048     public void test_Constructor_LStringLStringILThrowable_15() {
   1049         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
   1050                 null, "MYTESTSTRING", 0, null);
   1051         assertNotNull(sQLNonTransientConnectionException);
   1052         assertEquals(
   1053                 "The SQLState of SQLNonTransientConnectionException set and get should be equivalent",
   1054                 "MYTESTSTRING", sQLNonTransientConnectionException
   1055                 .getSQLState());
   1056         assertNull(
   1057                 "The reason of SQLNonTransientConnectionException should be null",
   1058                 sQLNonTransientConnectionException.getMessage());
   1059         assertEquals(
   1060                 "The error code of SQLNonTransientConnectionException should be 0",
   1061                 sQLNonTransientConnectionException.getErrorCode(), 0);
   1062         assertNull(
   1063                 "The cause of SQLNonTransientConnectionException should be null",
   1064                 sQLNonTransientConnectionException.getCause());
   1065 
   1066     }
   1067 
   1068     /**
   1069      * @test java.sql.SQLNonTransientConnectionException(String, String, int,
   1070      *Throwable)
   1071      */
   1072     public void test_Constructor_LStringLStringILThrowable_16() {
   1073         Throwable cause = new Exception("MYTHROWABLE");
   1074         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
   1075                 null, "MYTESTSTRING", -1, cause);
   1076         assertNotNull(sQLNonTransientConnectionException);
   1077         assertEquals(
   1078                 "The SQLState of SQLNonTransientConnectionException set and get should be equivalent",
   1079                 "MYTESTSTRING", sQLNonTransientConnectionException
   1080                 .getSQLState());
   1081         assertNull(
   1082                 "The reason of SQLNonTransientConnectionException should be null",
   1083                 sQLNonTransientConnectionException.getMessage());
   1084         assertEquals(
   1085                 "The error code of SQLNonTransientConnectionException should be -1",
   1086                 sQLNonTransientConnectionException.getErrorCode(), -1);
   1087         assertEquals(
   1088                 "The cause of SQLNonTransientConnectionException set and get should be equivalent",
   1089                 cause, sQLNonTransientConnectionException.getCause());
   1090     }
   1091 
   1092     /**
   1093      * @test java.sql.SQLNonTransientConnectionException(String, String, int,
   1094      *Throwable)
   1095      */
   1096     public void test_Constructor_LStringLStringILThrowable_17() {
   1097         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
   1098                 null, "MYTESTSTRING", -1, null);
   1099         assertNotNull(sQLNonTransientConnectionException);
   1100         assertEquals(
   1101                 "The SQLState of SQLNonTransientConnectionException set and get should be equivalent",
   1102                 "MYTESTSTRING", sQLNonTransientConnectionException
   1103                 .getSQLState());
   1104         assertNull(
   1105                 "The reason of SQLNonTransientConnectionException should be null",
   1106                 sQLNonTransientConnectionException.getMessage());
   1107         assertEquals(
   1108                 "The error code of SQLNonTransientConnectionException should be -1",
   1109                 sQLNonTransientConnectionException.getErrorCode(), -1);
   1110         assertNull(
   1111                 "The cause of SQLNonTransientConnectionException should be null",
   1112                 sQLNonTransientConnectionException.getCause());
   1113     }
   1114 
   1115     /**
   1116      * @test java.sql.SQLNonTransientConnectionException(String, String, int,
   1117      *Throwable)
   1118      */
   1119     public void test_Constructor_LStringLStringILThrowable_18() {
   1120         Throwable cause = new Exception("MYTHROWABLE");
   1121         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
   1122                 null, null, 1, cause);
   1123         assertNotNull(sQLNonTransientConnectionException);
   1124         assertNull(
   1125                 "The SQLState of SQLNonTransientConnectionException should be null",
   1126                 sQLNonTransientConnectionException.getSQLState());
   1127         assertNull(
   1128                 "The reason of SQLNonTransientConnectionException should be null",
   1129                 sQLNonTransientConnectionException.getMessage());
   1130         assertEquals(
   1131                 "The error code of SQLNonTransientConnectionException should be 1",
   1132                 sQLNonTransientConnectionException.getErrorCode(), 1);
   1133         assertEquals(
   1134                 "The cause of SQLNonTransientConnectionException set and get should be equivalent",
   1135                 cause, sQLNonTransientConnectionException.getCause());
   1136     }
   1137 
   1138     /**
   1139      * @test java.sql.SQLNonTransientConnectionException(String, String, int,
   1140      *Throwable)
   1141      */
   1142     public void test_Constructor_LStringLStringILThrowable_19() {
   1143         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
   1144                 null, null, 1, null);
   1145         assertNotNull(sQLNonTransientConnectionException);
   1146         assertNull(
   1147                 "The SQLState of SQLNonTransientConnectionException should be null",
   1148                 sQLNonTransientConnectionException.getSQLState());
   1149         assertNull(
   1150                 "The reason of SQLNonTransientConnectionException should be null",
   1151                 sQLNonTransientConnectionException.getMessage());
   1152         assertEquals(
   1153                 "The error code of SQLNonTransientConnectionException should be 1",
   1154                 sQLNonTransientConnectionException.getErrorCode(), 1);
   1155         assertNull(
   1156                 "The cause of SQLNonTransientConnectionException should be null",
   1157                 sQLNonTransientConnectionException.getCause());
   1158     }
   1159 
   1160     /**
   1161      * @test java.sql.SQLNonTransientConnectionException(String, String, int,
   1162      *Throwable)
   1163      */
   1164     public void test_Constructor_LStringLStringILThrowable_20() {
   1165         Throwable cause = new Exception("MYTHROWABLE");
   1166         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
   1167                 null, null, 0, cause);
   1168         assertNotNull(sQLNonTransientConnectionException);
   1169         assertNull(
   1170                 "The SQLState of SQLNonTransientConnectionException should be null",
   1171                 sQLNonTransientConnectionException.getSQLState());
   1172         assertNull(
   1173                 "The reason of SQLNonTransientConnectionException should be null",
   1174                 sQLNonTransientConnectionException.getMessage());
   1175         assertEquals(
   1176                 "The error code of SQLNonTransientConnectionException should be 0",
   1177                 sQLNonTransientConnectionException.getErrorCode(), 0);
   1178         assertEquals(
   1179                 "The cause of SQLNonTransientConnectionException set and get should be equivalent",
   1180                 cause, sQLNonTransientConnectionException.getCause());
   1181     }
   1182 
   1183     /**
   1184      * @test java.sql.SQLNonTransientConnectionException(String, String, int,
   1185      *Throwable)
   1186      */
   1187     public void test_Constructor_LStringLStringILThrowable_21() {
   1188         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
   1189                 null, null, 0, null);
   1190         assertNotNull(sQLNonTransientConnectionException);
   1191         assertNull(
   1192                 "The SQLState of SQLNonTransientConnectionException should be null",
   1193                 sQLNonTransientConnectionException.getSQLState());
   1194         assertNull(
   1195                 "The reason of SQLNonTransientConnectionException should be null",
   1196                 sQLNonTransientConnectionException.getMessage());
   1197         assertEquals(
   1198                 "The error code of SQLNonTransientConnectionException should be 0",
   1199                 sQLNonTransientConnectionException.getErrorCode(), 0);
   1200         assertNull(
   1201                 "The cause of SQLNonTransientConnectionException should be null",
   1202                 sQLNonTransientConnectionException.getCause());
   1203     }
   1204 
   1205     /**
   1206      * @test java.sql.SQLNonTransientConnectionException(String, String, int,
   1207      *Throwable)
   1208      */
   1209     public void test_Constructor_LStringLStringILThrowable_22() {
   1210         Throwable cause = new Exception("MYTHROWABLE");
   1211         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
   1212                 null, null, -1, cause);
   1213         assertNotNull(sQLNonTransientConnectionException);
   1214         assertNull(
   1215                 "The SQLState of SQLNonTransientConnectionException should be null",
   1216                 sQLNonTransientConnectionException.getSQLState());
   1217         assertNull(
   1218                 "The reason of SQLNonTransientConnectionException should be null",
   1219                 sQLNonTransientConnectionException.getMessage());
   1220         assertEquals(
   1221                 "The error code of SQLNonTransientConnectionException should be -1",
   1222                 sQLNonTransientConnectionException.getErrorCode(), -1);
   1223         assertEquals(
   1224                 "The cause of SQLNonTransientConnectionException set and get should be equivalent",
   1225                 cause, sQLNonTransientConnectionException.getCause());
   1226     }
   1227 
   1228     /**
   1229      * @test java.sql.SQLNonTransientConnectionException(String, String, int,
   1230      *Throwable)
   1231      */
   1232     public void test_Constructor_LStringLStringILThrowable_23() {
   1233         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
   1234                 null, null, -1, null);
   1235         assertNotNull(sQLNonTransientConnectionException);
   1236         assertNull(
   1237                 "The SQLState of SQLNonTransientConnectionException should be null",
   1238                 sQLNonTransientConnectionException.getSQLState());
   1239         assertNull(
   1240                 "The reason of SQLNonTransientConnectionException should be null",
   1241                 sQLNonTransientConnectionException.getMessage());
   1242         assertEquals(
   1243                 "The error code of SQLNonTransientConnectionException should be -1",
   1244                 sQLNonTransientConnectionException.getErrorCode(), -1);
   1245         assertNull(
   1246                 "The cause of SQLNonTransientConnectionException should be null",
   1247                 sQLNonTransientConnectionException.getCause());
   1248     }
   1249 
   1250     /**
   1251      * @test java.sql.SQLNonTransientConnectionException()
   1252      */
   1253     public void test_Constructor() {
   1254         SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException();
   1255         assertNotNull(sQLNonTransientConnectionException);
   1256         assertNull(
   1257                 "The SQLState of SQLNonTransientConnectionException should be null",
   1258                 sQLNonTransientConnectionException.getSQLState());
   1259         assertNull(
   1260                 "The reason of SQLNonTransientConnectionException should be null",
   1261                 sQLNonTransientConnectionException.getMessage());
   1262         assertEquals(
   1263                 "The error code of SQLNonTransientConnectionException should be 0",
   1264                 sQLNonTransientConnectionException.getErrorCode(), 0);
   1265     }
   1266 
   1267     /**
   1268      * @test serialization/deserialization compatibility.
   1269      */
   1270     public void test_serialization() throws Exception {
   1271         SerializationTest.verifySelf(sQLNonTransientConnectionException);
   1272     }
   1273 
   1274     /**
   1275      * @test serialization/deserialization compatibility with RI.
   1276      */
   1277     public void test_compatibilitySerialization() throws Exception {
   1278         SerializationTest
   1279                 .verifyGolden(this, sQLNonTransientConnectionException);
   1280     }
   1281 }
   1282