/**
 * Scaffolding file used to store all the setups needed to run 
 * tests automatically generated by EvoSuite
 * Thu Sep 20 11:43:39 GMT 2018
 */

package uk.ac.sanger.artemis.chado;

import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.junit.AfterClass;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;

@EvoSuiteClassExclude
public class JdbcDAO_ESTest_scaffolding {

  @org.junit.Rule 
  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();

  protected static ExecutorService executor; 

  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 

  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);


  @BeforeClass 
  public static void initEvoSuiteFramework() { 
    org.evosuite.runtime.RuntimeSettings.className = "uk.ac.sanger.artemis.chado.JdbcDAO"; 
    org.evosuite.runtime.GuiSupport.initialize(); 
    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
    executor = Executors.newCachedThreadPool(); 
    org.evosuite.runtime.classhandling.JDKClassResetter.init();
    setSystemProperties();
    initializeClasses();
    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
  } 

  @AfterClass 
  public static void clearEvoSuiteFramework(){ 
    Sandbox.resetDefaultSecurityManager(); 
    executor.shutdownNow(); 
    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
  } 

  @Before 
  public void initTestCase(){ 
    threadStopper.storeCurrentThreads();
    threadStopper.startRecordingTime();
    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
    setSystemProperties(); 
    org.evosuite.runtime.GuiSupport.setHeadless(); 
    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
  } 

  @After 
  public void doneWithTestCase(){ 
    threadStopper.killAndJoinClientThreads();
    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
    resetClasses(); 
    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
  } 

  public static void setSystemProperties() {
 
    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
    java.lang.System.setProperty("file.encoding", "UTF-8"); 
    java.lang.System.setProperty("java.awt.headless", "true"); 
    java.lang.System.setProperty("java.io.tmpdir", "/var/folders/r3/l648tx8s7hn8ppds6z2bk5cc000h2n/T/"); 
    java.lang.System.setProperty("user.country", "GB"); 
    java.lang.System.setProperty("user.dir", "/Users/kp11/workspace/applications/Artemis-build-ci/Artemis"); 
    java.lang.System.setProperty("user.home", "/Users/kp11"); 
    java.lang.System.setProperty("user.language", "en"); 
    java.lang.System.setProperty("user.name", "kp11"); 
    java.lang.System.setProperty("user.timezone", ""); 
    java.lang.System.setProperty("log4j.configuration", "SUT.log4j.properties"); 
  }

  private static void initializeClasses() {
    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(JdbcDAO_ESTest_scaffolding.class.getClassLoader() ,
      "org.gmod.schema.cv.CvTermPath",
      "org.postgresql.hostchooser.HostRequirement",
      "org.apache.xmlgraphics.java2d.GraphicsConfigurationWithTransparency",
      "org.apache.log4j.DefaultCategoryFactory",
      "org.apache.log4j.or.RendererMap",
      "org.postgresql.core.CachedQuery",
      "org.postgresql.util.LruCache$2",
      "org.postgresql.util.LruCache$1",
      "org.hsqldb.jdbc.JDBCDriver",
      "org.postgresql.core.v3.TypeTransferModeRegistry",
      "org.postgresql.util.SharedTimer",
      "org.apache.log4j.Level",
      "org.postgresql.core.BaseConnection",
      "org.postgresql.core.ResultHandler",
      "org.gmod.schema.pub.PubDbXRef",
      "org.gmod.schema.general.DbXRef",
      "org.apache.xmlgraphics.java2d.GenericGraphicsDevice",
      "org.hsqldb.jdbc.JDBCDriver$1",
      "org.postgresql.replication.LogSequenceNumber",
      "org.postgresql.core.Version",
      "org.postgresql.util.LruCache",
      "org.postgresql.core.PGStream",
      "org.postgresql.core.EncodingPredictor$DecodeResult",
      "org.postgresql.core.PGBindException",
      "org.postgresql.core.Encoding",
      "org.apache.log4j.spi.Filter",
      "org.postgresql.core.TypeInfo",
      "org.postgresql.core.ResultCursor",
      "org.postgresql.replication.fluent.ChainedCreateReplicationSlotBuilder",
      "org.apache.log4j.CategoryKey",
      "uk.ac.sanger.artemis.chado.Graph",
      "org.hsqldb.persist.HsqlProperties",
      "org.postgresql.sspi.ISSPIClient",
      "org.apache.batik.gvt.text.GVTAttributedCharacterIterator$TextAttribute",
      "org.postgresql.core.ResultHandlerBase",
      "org.apache.log4j.Layout",
      "org.postgresql.copy.CopyDual",
      "org.postgresql.jdbc.PreferQueryMode",
      "org.emboss.jemboss.JembossParams",
      "org.postgresql.replication.fluent.ChainedCommonCreateSlotBuilder",
      "org.hsqldb.types.TimestampData",
      "org.gmod.schema.analysis.AnalysisFeature",
      "org.gmod.schema.dao.SchemaDaoI",
      "org.postgresql.util.CanEstimateSize",
      "org.gmod.schema.sequence.Synonym",
      "org.postgresql.util.ServerErrorMessage",
      "org.gmod.schema.sequence.FeatureRelationship",
      "org.apache.batik.gvt.text.GVTAttributedCharacterIterator$AttributeFilter",
      "org.gmod.schema.sequence.FeatureCvTermProp",
      "org.postgresql.largeobject.BlobInputStream",
      "org.apache.log4j.helpers.Loader",
      "org.postgresql.core.SqlCommand",
      "org.postgresql.util.PSQLException",
      "org.apache.log4j.ProvisionNode",
      "org.apache.log4j.Hierarchy",
      "org.postgresql.core.SqlCommandType",
      "org.hsqldb.map.ValuePoolHashMap",
      "org.postgresql.util.ExpressionProperties",
      "org.emboss.jemboss.gui.Browser$3",
      "org.emboss.jemboss.gui.Browser$4",
      "org.emboss.jemboss.gui.MemoryComboBox",
      "org.postgresql.fastpath.Fastpath",
      "org.postgresql.jdbc.TimestampUtils$ParsedBinaryTimestamp",
      "org.postgresql.util.WriterHandler",
      "org.postgresql.replication.fluent.physical.ChainedPhysicalCreateSlotBuilder",
      "org.postgresql.largeobject.LargeObjectManager",
      "org.postgresql.copy.CopyManager",
      "org.postgresql.core.v3.ConnectionFactoryImpl",
      "org.emboss.jemboss.gui.Browser$6",
      "org.postgresql.largeobject.LargeObject",
      "uk.ac.sanger.artemis.chado.GmodDAO",
      "org.postgresql.replication.fluent.ChainedStreamBuilder",
      "org.emboss.jemboss.gui.Browser",
      "org.gmod.schema.dao.SequenceDaoI",
      "org.apache.log4j.spi.DefaultRepositorySelector",
      "org.apache.log4j.spi.OptionHandler",
      "org.apache.log4j.spi.RootLogger",
      "org.postgresql.core.ReplicationProtocol",
      "org.emboss.jemboss.gui.Browser$JIconButton",
      "org.postgresql.replication.fluent.ChainedCommonStreamBuilder",
      "org.postgresql.hostchooser.CandidateHost",
      "org.postgresql.core.Field",
      "org.apache.log4j.spi.ErrorHandler",
      "org.postgresql.util.PSQLState",
      "org.postgresql.PGProperty",
      "org.postgresql.core.v3.ConnectionFactoryImpl$UnsupportedProtocolException",
      "org.apache.log4j.spi.RendererSupport",
      "org.postgresql.PGConnection",
      "org.postgresql.copy.CopyOut",
      "org.apache.xmlgraphics.java2d.AbstractGraphicsConfiguration",
      "org.postgresql.core.PGStream$1",
      "org.postgresql.replication.PGReplicationStream",
      "org.gmod.schema.sequence.FeatureCvTerm",
      "org.postgresql.replication.fluent.logical.ChainedLogicalStreamBuilder",
      "org.gmod.schema.utils.CollectionUtils",
      "org.postgresql.core.UTF8Encoding",
      "uk.ac.sanger.artemis.chado.JdbcDAO",
      "org.gmod.schema.dao.GeneralDaoI",
      "org.gmod.schema.dao.BaseDaoI",
      "org.apache.log4j.helpers.OptionConverter",
      "org.postgresql.util.LruCache$EvictAction",
      "org.postgresql.Driver",
      "org.postgresql.core.QueryExecutor",
      "org.postgresql.util.GT",
      "org.postgresql.hostchooser.HostRequirement$4",
      "org.apache.log4j.or.ObjectRenderer",
      "org.postgresql.largeobject.BlobOutputStream",
      "uk.ac.sanger.artemis.util.DatabaseLocationParser",
      "org.postgresql.util.LruCache$CreateAction",
      "org.gmod.schema.dao.CvDaoI",
      "org.gmod.schema.cv.CvTerm",
      "org.hsqldb.lib.Iterator",
      "org.apache.xmlgraphics.java2d.GraphicsConfigurationWithoutTransparency",
      "org.apache.log4j.Logger",
      "org.postgresql.jdbc.FieldMetadata",
      "org.postgresql.jdbc.BatchResultHandler",
      "org.postgresql.copy.CopyOperation",
      "org.apache.log4j.helpers.LogLog",
      "org.apache.log4j.Category",
      "org.postgresql.PGNotification",
      "org.gmod.schema.analysis.Analysis",
      "org.postgresql.jdbc.TimestampUtils$ParsedTimestamp",
      "org.apache.batik.gvt.text.GVTAttributedCharacterIterator",
      "org.apache.log4j.spi.RepositorySelector",
      "org.hsqldb.lib.FileAccess",
      "org.postgresql.fastpath.FastpathArg",
      "org.hsqldb.DatabaseURL",
      "org.postgresql.hostchooser.HostChooser",
      "org.gmod.schema.sequence.FeatureDbXRef",
      "org.hsqldb.map.HashIndex",
      "org.postgresql.core.SocketFactoryFactory",
      "org.apache.log4j.spi.LoggerFactory",
      "org.apache.log4j.spi.Configurator",
      "org.gmod.schema.pub.Pub",
      "org.apache.log4j.or.DefaultRenderer",
      "org.postgresql.jdbc.AutoSave",
      "org.apache.log4j.spi.LocationInfo",
      "org.gmod.schema.sequence.Feature",
      "org.postgresql.core.ParameterList",
      "org.postgresql.util.HostSpec",
      "org.gmod.schema.sequence.FeatureCvTermDbXRef",
      "org.gmod.schema.sequence.FeatureProp",
      "org.apache.log4j.spi.ThrowableRendererSupport",
      "org.apache.log4j.PropertyConfigurator",
      "org.gmod.schema.sequence.FeatureCvTermPub",
      "org.gmod.schema.utils.Rankable",
      "org.apache.log4j.spi.ThrowableRenderer",
      "org.apache.commons.logging.impl.Log4JLogger",
      "org.gmod.schema.general.Db",
      "org.gmod.schema.organism.Organism",
      "org.postgresql.replication.fluent.physical.ChainedPhysicalStreamBuilder",
      "org.postgresql.core.Provider",
      "org.hsqldb.map.BaseHashMap",
      "org.postgresql.replication.fluent.logical.LogicalReplicationOptions",
      "org.apache.log4j.Appender",
      "org.hsqldb.lib.FileAccess$FileSync",
      "org.postgresql.replication.fluent.CommonOptions",
      "org.postgresql.core.TransactionState",
      "org.postgresql.copy.CopyIn",
      "org.postgresql.core.ConnectionFactory",
      "org.postgresql.jdbc.TimestampUtils",
      "org.postgresql.replication.PGReplicationConnection",
      "org.postgresql.replication.fluent.logical.ChainedLogicalCreateSlotBuilder",
      "org.postgresql.jdbc.PgConnection",
      "org.apache.log4j.spi.HierarchyEventListener",
      "org.hsqldb.map.ValuePool",
      "org.hsqldb.lib.ObjectComparator",
      "org.gmod.schema.utils.propinterface.PropertyI",
      "uk.ac.sanger.artemis.chado.FeatureForUpdatingResidues",
      "org.gmod.schema.dao.OrganismDaoI",
      "org.gmod.schema.sequence.FeatureSynonym",
      "org.apache.log4j.spi.AppenderAttachable",
      "org.apache.log4j.spi.LoggingEvent",
      "org.postgresql.hostchooser.HostChooserFactory",
      "org.postgresql.core.JavaVersion",
      "org.gmod.schema.cv.Cv",
      "org.postgresql.hostchooser.SingleHostChooser",
      "org.apache.log4j.spi.ThrowableInformation",
      "org.postgresql.Driver$1",
      "org.apache.log4j.Priority",
      "org.postgresql.hostchooser.HostStatus",
      "org.postgresql.hostchooser.HostRequirement$2",
      "org.postgresql.hostchooser.HostRequirement$3",
      "org.apache.log4j.spi.LoggerRepository",
      "org.postgresql.core.Query",
      "org.apache.log4j.LogManager",
      "org.postgresql.hostchooser.HostRequirement$1",
      "org.gmod.schema.sequence.FeatureLoc",
      "org.gmod.schema.dao.PubDaoI",
      "org.postgresql.replication.fluent.physical.PhysicalReplicationOptions"
    );
  } 

  private static void resetClasses() {
    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(JdbcDAO_ESTest_scaffolding.class.getClassLoader()); 

    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
      "org.apache.log4j.Category",
      "org.apache.log4j.Logger",
      "org.apache.log4j.Hierarchy",
      "org.apache.log4j.spi.RootLogger",
      "org.apache.log4j.Priority",
      "org.apache.log4j.Level",
      "org.apache.log4j.or.DefaultRenderer",
      "org.apache.log4j.or.RendererMap",
      "org.apache.log4j.DefaultCategoryFactory",
      "org.apache.log4j.spi.DefaultRepositorySelector",
      "org.apache.log4j.helpers.OptionConverter",
      "org.apache.log4j.helpers.Loader",
      "org.apache.log4j.helpers.LogLog",
      "org.apache.log4j.PropertyConfigurator",
      "org.apache.log4j.LogManager",
      "org.apache.log4j.CategoryKey",
      "org.apache.log4j.ProvisionNode",
      "uk.ac.sanger.artemis.chado.GmodDAO",
      "uk.ac.sanger.artemis.chado.JdbcDAO",
      "uk.ac.sanger.artemis.util.DatabaseLocationParser",
      "org.postgresql.util.SharedTimer",
      "org.postgresql.Driver",
      "org.hsqldb.jdbc.JDBCDriver",
      "org.postgresql.Driver$1",
      "org.postgresql.PGProperty",
      "org.postgresql.jdbc.PgConnection",
      "org.postgresql.util.HostSpec",
      "org.postgresql.core.ConnectionFactory",
      "org.postgresql.core.v3.ConnectionFactoryImpl",
      "org.postgresql.hostchooser.HostRequirement",
      "org.postgresql.core.SocketFactoryFactory",
      "org.postgresql.hostchooser.HostChooserFactory",
      "org.postgresql.hostchooser.SingleHostChooser",
      "org.postgresql.hostchooser.CandidateHost",
      "org.postgresql.core.PGStream",
      "org.postgresql.util.PSQLException",
      "org.postgresql.util.GT",
      "org.postgresql.util.PSQLState",
      "org.hsqldb.DatabaseURL",
      "org.hsqldb.persist.HsqlProperties",
      "org.hsqldb.map.BaseHashMap",
      "org.hsqldb.map.ValuePoolHashMap",
      "org.hsqldb.map.HashIndex",
      "org.hsqldb.map.ValuePool",
      "org.apache.xmlgraphics.java2d.AbstractGraphicsConfiguration",
      "org.apache.xmlgraphics.java2d.GraphicsConfigurationWithTransparency",
      "org.apache.commons.logging.impl.Log4JLogger",
      "org.apache.xmlgraphics.java2d.GraphicsConfigurationWithoutTransparency",
      "org.gmod.schema.sequence.Feature",
      "uk.ac.sanger.artemis.chado.FeatureForUpdatingResidues",
      "org.gmod.schema.sequence.FeatureCvTerm",
      "org.gmod.schema.cv.CvTerm",
      "org.gmod.schema.sequence.FeatureCvTermDbXRef",
      "org.gmod.schema.cv.Cv",
      "org.gmod.schema.general.DbXRef",
      "org.gmod.schema.pub.Pub",
      "org.gmod.schema.general.Db",
      "org.gmod.schema.sequence.FeatureSynonym",
      "org.apache.batik.gvt.text.GVTAttributedCharacterIterator$TextAttribute",
      "org.gmod.schema.sequence.Synonym",
      "org.gmod.schema.cv.CvTermPath",
      "org.gmod.schema.utils.CollectionUtils",
      "org.emboss.jemboss.gui.Browser",
      "org.emboss.jemboss.JembossParams",
      "org.gmod.schema.sequence.FeatureLoc",
      "org.gmod.schema.sequence.FeatureProp"
    );
  }
}
