code: final void logicalClose(final boolean withTest) throws SQLException {
  
        openTime = 0L;
  
        if(debug) {
           lastTrace = null;
        }
  
        if(logicalCloseException != null) { //Set during close() & thrown here to cause segment to reopen.
           Util.throwException(logicalCloseException);
        }
  
        if(withTest) {
           conn.setAutoCommit(true);
           if(testSQL != null && testSQL.length() > 0) {
              ResultSet rs = null;
              Statement stmt = null;
              try {
                 stmt = conn.createStatement();
                 rs = stmt.executeQuery(testSQL);
              } finally {
                 try {
                    if(rs != null) {
                       rs.close();
                    }
                 } finally {
                    if(stmt != null) {
                       stmt.close();
                    }
                 }
              }
           }
        }
     }
docs: Prepares the connection for return to the active pool.
  @param withTest Should the connection be tested?
  @throws SQLException on test error or exception raised (and thrown) during application close.