public void testBuilder_RootOnConstruct_MultipleAppends(){
  SQLException root=new SQLException();
  List<SQLException> additionalExceptions=new ArrayList<SQLException>();
  for (int count=1; count <= 3; count++) {
    additionalExceptions.add(new SQLException(Integer.toString(count)));
  }
  SQLExceptionChainBuilder<SQLException> builder=new SQLExceptionChainBuilder<SQLException>(root);
  for (  SQLException ex : additionalExceptions) {
    builder.append(ex);
  }
  assertTrue("SQLExceptionChainBuilder has a exception",builder.hasException());
  SQLException resultException=builder.getException();
  assertSame("Expected root exception to be identical to returned exception",root,resultException);
  checkExceptionChain(resultException,additionalExceptions);
}

public void testBuilder_RootOnConstruct_MultipleAppends ( ) { SQLException root = new SQLException ( ) ; List < SQLException > additionalExceptions = new ArrayList < SQLException > ( ) ; for ( int count = 1 ; count <= 3 ; count ++ ) { additionalExceptions . add ( new SQLException ( Integer . toString ( count ) ) ) ; } SQLExceptionChainBuilder < SQLException > builder = new SQLExceptionChainBuilder < SQLException > ( root ) ; for ( SQLException ex : additionalExceptions ) { builder . append ( ex ) ; } assertTrue ( "SQLExceptionChainBuilder has a exception" , builder . hasException ( ) ) ; SQLException resultException = builder . getException ( ) ; assertSame ( "Expected root exception to be identical to returned exception" , root , resultException ) ; checkExceptionChain ( resultException , additionalExceptions ) ; }
test for sqlexceptionchainbuilder constructed with a root sqlexception and multiple appends .
