/*
 * This file was automatically generated by EvoSuite
 * Wed Sep 19 18:22:32 GMT 2018
 */

package uk.ac.sanger.artemis.chado;

import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import java.util.LinkedList;
import java.util.Stack;
import java.util.Vector;
import javax.swing.JPasswordField;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.gmod.schema.general.Db;
import org.gmod.schema.general.DbXRef;
import org.gmod.schema.sequence.FeatureDbXRef;
import org.junit.runner.RunWith;
import uk.ac.sanger.artemis.chado.FeatureForUpdatingResidues;
import uk.ac.sanger.artemis.chado.IBatisDAO;

@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = false, useJEE = true) 
public class IBatisDAO_ESTest extends IBatisDAO_ESTest_scaffolding {

  @Test(timeout = 4000)
  public void test0()  throws Throwable  {
      Vector<FeatureDbXRef> vector0 = new Vector<FeatureDbXRef>();
      Db db0 = new Db();
      DbXRef dbXRef0 = new DbXRef(db0, "{e_JLpA2;&>i");
      FeatureForUpdatingResidues featureForUpdatingResidues0 = new FeatureForUpdatingResidues();
      FeatureDbXRef featureDbXRef0 = new FeatureDbXRef(dbXRef0, featureForUpdatingResidues0, false);
      vector0.add(featureDbXRef0);
      vector0.add(featureDbXRef0);
      IBatisDAO.mergeDbXRef(vector0);
      JPasswordField jPasswordField0 = new JPasswordField("{e_JLpA2;&>i", 1);
      IBatisDAO iBatisDAO0 = null;
      try {
        iBatisDAO0 = new IBatisDAO(jPasswordField0);
        fail("Expecting exception: RuntimeException");
      
      } catch(RuntimeException e) {
         //
         // Error initializing DbSqlConfig class.  Cause: org.evosuite.runtime.mock.java.lang.MockThrowable: Error occurred.  Cause: org.evosuite.runtime.mock.java.lang.MockThrowable: Error parsing XML.  Cause: org.evosuite.runtime.mock.java.lang.MockThrowable: Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause: org.evosuite.runtime.mock.java.lang.MockThrowable: Error parsing XML.  Cause: org.evosuite.runtime.TooManyResourcesException: Loop has been executed more times than the allowed 10000
         //
         verifyException("uk.ac.sanger.artemis.chado.DbSqlConfig", e);
      }
  }

  @Test(timeout = 4000)
  public void test1()  throws Throwable  {
      Vector<FeatureDbXRef> vector0 = new Vector<FeatureDbXRef>();
      Db db0 = new Db();
      DbXRef dbXRef0 = new DbXRef(db0, "{e_JLpA2;&>i");
      FeatureForUpdatingResidues featureForUpdatingResidues0 = new FeatureForUpdatingResidues();
      FeatureDbXRef featureDbXRef0 = new FeatureDbXRef(dbXRef0, featureForUpdatingResidues0, false);
      vector0.add(featureDbXRef0);
      IBatisDAO.mergeDbXRef(vector0);
      JPasswordField jPasswordField0 = new JPasswordField("", 1);
      IBatisDAO iBatisDAO0 = null;
      try {
        iBatisDAO0 = new IBatisDAO(jPasswordField0);
        fail("Expecting exception: RuntimeException");
      
      } catch(RuntimeException e) {
         //
         // Error initializing DbSqlConfig class.  Cause: org.evosuite.runtime.mock.java.lang.MockThrowable: Error occurred.  Cause: org.evosuite.runtime.mock.java.lang.MockThrowable: Error parsing XML.  Cause: org.evosuite.runtime.mock.java.lang.MockThrowable: Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause: org.evosuite.runtime.mock.java.lang.MockThrowable: Error parsing XML.  Cause: org.evosuite.runtime.TooManyResourcesException: Loop has been executed more times than the allowed 10000
         //
         verifyException("uk.ac.sanger.artemis.chado.DbSqlConfig", e);
      }
  }

  @Test(timeout = 4000)
  public void test2()  throws Throwable  {
      LinkedList<FeatureDbXRef> linkedList0 = new LinkedList<FeatureDbXRef>();
      FeatureDbXRef featureDbXRef0 = new FeatureDbXRef();
      FeatureForUpdatingResidues featureForUpdatingResidues0 = new FeatureForUpdatingResidues();
      featureDbXRef0.setFeature(featureForUpdatingResidues0);
      featureDbXRef0.setFeatureDbXRefId(0);
      linkedList0.addLast(featureDbXRef0);
      linkedList0.toArray();
      linkedList0.add(featureDbXRef0);
      // Undeclared exception!
      try { 
        IBatisDAO.mergeDbXRef(linkedList0);
        fail("Expecting exception: NullPointerException");
      
      } catch(NullPointerException e) {
         //
         // no message in exception (getMessage() returned null)
         //
         verifyException("uk.ac.sanger.artemis.chado.IBatisDAO", e);
      }
  }

  @Test(timeout = 4000)
  public void test3()  throws Throwable  {
      Vector<FeatureDbXRef> vector0 = new Vector<FeatureDbXRef>();
      IBatisDAO.mergeDbXRef(vector0);
      String string0 = "";
      int int0 = 1;
      JPasswordField jPasswordField0 = new JPasswordField("", 1);
      IBatisDAO iBatisDAO0 = null;
      try {
        iBatisDAO0 = new IBatisDAO(jPasswordField0);
       //  fail("Expecting exception: RuntimeException");
       // Unstable assertion
      } catch(RuntimeException e) {
         //
         // Error initializing DbSqlConfig class.  Cause: org.evosuite.runtime.mock.java.lang.MockThrowable: Error occurred.  Cause: org.evosuite.runtime.mock.java.lang.MockThrowable: Error parsing XML.  Cause: org.evosuite.runtime.mock.java.lang.MockThrowable: Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause: org.evosuite.runtime.mock.java.lang.MockThrowable: Error parsing XML.  Cause: org.evosuite.runtime.TooManyResourcesException: Loop has been executed more times than the allowed 10000
         //
         verifyException("uk.ac.sanger.artemis.chado.DbSqlConfig", e);
      }
  }

  @Test(timeout = 4000)
  public void test4()  throws Throwable  {
      LinkedList<FeatureDbXRef> linkedList0 = new LinkedList<FeatureDbXRef>();
      FeatureDbXRef featureDbXRef0 = new FeatureDbXRef();
      featureDbXRef0.setFeatureDbXRefId(0);
      linkedList0.addLast(featureDbXRef0);
      linkedList0.toArray();
      linkedList0.add(featureDbXRef0);
      // Undeclared exception!
      try { 
        IBatisDAO.mergeDbXRef(linkedList0);
        fail("Expecting exception: NullPointerException");
      
      } catch(NullPointerException e) {
         //
         // no message in exception (getMessage() returned null)
         //
         verifyException("uk.ac.sanger.artemis.chado.IBatisDAO", e);
      }
  }

  @Test(timeout = 4000)
  public void test5()  throws Throwable  {
      String string0 = "reference";
      JPasswordField jPasswordField0 = new JPasswordField("reference");
      IBatisDAO iBatisDAO0 = null;
      try {
        iBatisDAO0 = new IBatisDAO(jPasswordField0);
       //  fail("Expecting exception: RuntimeException");
       // Unstable assertion
      } catch(RuntimeException e) {
         //
         // Error initializing DbSqlConfig class.  Cause: org.evosuite.runtime.mock.java.lang.MockThrowable: Error occurred.  Cause: org.evosuite.runtime.mock.java.lang.MockThrowable: Error parsing XML.  Cause: org.evosuite.runtime.mock.java.lang.MockThrowable: Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause: org.evosuite.runtime.mock.java.lang.MockThrowable: Error parsing XML.  Cause: org.evosuite.runtime.TooManyResourcesException: Loop has been executed more times than the allowed 10000
         //
         verifyException("uk.ac.sanger.artemis.chado.DbSqlConfig", e);
      }
  }

  @Test(timeout = 4000)
  public void test6()  throws Throwable  {
      int int0 = 2628;
      JPasswordField jPasswordField0 = new JPasswordField(2628);
      IBatisDAO iBatisDAO0 = null;
      try {
        iBatisDAO0 = new IBatisDAO(jPasswordField0);
       //  fail("Expecting exception: RuntimeException");
       // Unstable assertion
      } catch(RuntimeException e) {
         //
         // Error initializing DbSqlConfig class.  Cause: org.evosuite.runtime.mock.java.lang.MockThrowable: Error occurred.  Cause: org.evosuite.runtime.mock.java.lang.MockThrowable: Error parsing XML.  Cause: org.evosuite.runtime.mock.java.lang.MockThrowable: Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause: org.evosuite.runtime.mock.java.lang.MockThrowable: Error parsing XML.  Cause: org.evosuite.runtime.TooManyResourcesException: Loop has been executed more times than the allowed 10000
         //
         verifyException("uk.ac.sanger.artemis.chado.DbSqlConfig", e);
      }
  }

  @Test(timeout = 4000)
  public void test7()  throws Throwable  {
      JPasswordField jPasswordField0 = new JPasswordField();
      IBatisDAO iBatisDAO0 = null;
      try {
        iBatisDAO0 = new IBatisDAO(jPasswordField0);
       //  fail("Expecting exception: RuntimeException");
       // Unstable assertion
      } catch(RuntimeException e) {
         //
         // Error initializing DbSqlConfig class.  Cause: org.evosuite.runtime.mock.java.lang.MockThrowable: Error occurred.  Cause: org.evosuite.runtime.mock.java.lang.MockThrowable: Error parsing XML.  Cause: org.evosuite.runtime.mock.java.lang.MockThrowable: Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause: org.evosuite.runtime.mock.java.lang.MockThrowable: Error parsing XML.  Cause: org.evosuite.runtime.TooManyResourcesException: Loop has been executed more times than the allowed 10000
         //
         verifyException("uk.ac.sanger.artemis.chado.DbSqlConfig", e);
      }
  }

  @Test(timeout = 4000)
  public void test8()  throws Throwable  {
      Stack<FeatureDbXRef> stack0 = new Stack<FeatureDbXRef>();
      Db db0 = new Db();
      DbXRef dbXRef0 = new DbXRef(db0, "{e_JLpA2;&>i");
      FeatureForUpdatingResidues featureForUpdatingResidues0 = new FeatureForUpdatingResidues();
      FeatureDbXRef featureDbXRef0 = new FeatureDbXRef(dbXRef0, featureForUpdatingResidues0, false);
      stack0.add(featureDbXRef0);
      stack0.add(featureDbXRef0);
      IBatisDAO.mergeDbXRef(stack0);
      JPasswordField jPasswordField0 = new JPasswordField("{e_JLpA2;&>i", 1);
      IBatisDAO iBatisDAO0 = null;
      try {
        iBatisDAO0 = new IBatisDAO(jPasswordField0);
        fail("Expecting exception: RuntimeException");
      
      } catch(RuntimeException e) {
         //
         // Error initializing DbSqlConfig class.  Cause: org.evosuite.runtime.mock.java.lang.MockThrowable: Error occurred.  Cause: org.evosuite.runtime.mock.java.lang.MockThrowable: Error parsing XML.  Cause: org.evosuite.runtime.mock.java.lang.MockThrowable: Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause: org.evosuite.runtime.mock.java.lang.MockThrowable: Error parsing XML.  Cause: org.evosuite.runtime.TooManyResourcesException: Loop has been executed more times than the allowed 10000
         //
         verifyException("uk.ac.sanger.artemis.chado.DbSqlConfig", e);
      }
  }
}
