/*
 * This file was automatically generated by EvoSuite
 * Thu Sep 20 13:15:58 GMT 2018
 */

package uk.ac.sanger.artemis;

import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.shaded.org.mockito.Mockito.*;
import static org.evosuite.runtime.EvoAssertions.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.evosuite.runtime.ViolatedAssumptionAnswer;
import org.junit.runner.RunWith;
import uk.ac.sanger.artemis.Feature;
import uk.ac.sanger.artemis.FeatureChangeEvent;
import uk.ac.sanger.artemis.io.Key;
import uk.ac.sanger.artemis.io.Location;
import uk.ac.sanger.artemis.io.QualifierVector;

@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
public class FeatureChangeEvent_ESTest extends FeatureChangeEvent_ESTest_scaffolding {

  @Test(timeout = 4000)
  public void test00()  throws Throwable  {
      Feature feature0 = mock(Feature.class, new ViolatedAssumptionAnswer());
      doReturn((Key) null).when(feature0).getKey();
      doReturn((Location) null).when(feature0).getLocation();
      doReturn((QualifierVector) null).when(feature0).getQualifiers();
      Key key0 = mock(Key.class, new ViolatedAssumptionAnswer());
      Location location0 = mock(Location.class, new ViolatedAssumptionAnswer());
      FeatureChangeEvent featureChangeEvent0 = new FeatureChangeEvent("", feature0, key0, location0, (QualifierVector) null, Integer.MAX_VALUE);
      int int0 = featureChangeEvent0.getType();
      assertEquals(Integer.MAX_VALUE, int0);
  }

  @Test(timeout = 4000)
  public void test01()  throws Throwable  {
      Feature feature0 = mock(Feature.class, new ViolatedAssumptionAnswer());
      doReturn((Key) null).when(feature0).getKey();
      doReturn((Location) null).when(feature0).getLocation();
      doReturn((QualifierVector) null).when(feature0).getQualifiers();
      Key key0 = mock(Key.class, new ViolatedAssumptionAnswer());
      Location location0 = mock(Location.class, new ViolatedAssumptionAnswer());
      FeatureChangeEvent featureChangeEvent0 = new FeatureChangeEvent("", feature0, key0, location0, (QualifierVector) null, (-1675));
      int int0 = featureChangeEvent0.getType();
      assertEquals((-1675), int0);
  }

  @Test(timeout = 4000)
  public void test02()  throws Throwable  {
      Feature feature0 = mock(Feature.class, new ViolatedAssumptionAnswer());
      doReturn((Key) null).when(feature0).getKey();
      doReturn((Location) null).when(feature0).getLocation();
      doReturn((QualifierVector) null).when(feature0).getQualifiers();
      Key key0 = mock(Key.class, new ViolatedAssumptionAnswer());
      Location location0 = mock(Location.class, new ViolatedAssumptionAnswer());
      doReturn((String) null).when(location0).toString();
      FeatureChangeEvent featureChangeEvent0 = new FeatureChangeEvent("Ser", feature0, key0, location0, (QualifierVector) null, 0);
      featureChangeEvent0.getOldLocation();
      assertEquals(0, featureChangeEvent0.getType());
  }

  @Test(timeout = 4000)
  public void test03()  throws Throwable  {
      Feature feature0 = mock(Feature.class, new ViolatedAssumptionAnswer());
      doReturn((Key) null).when(feature0).getKey();
      doReturn((Location) null).when(feature0).getLocation();
      doReturn((QualifierVector) null).when(feature0).getQualifiers();
      Location location0 = mock(Location.class, new ViolatedAssumptionAnswer());
      FeatureChangeEvent featureChangeEvent0 = new FeatureChangeEvent("", feature0, (Key) null, location0, (QualifierVector) null, 0);
      featureChangeEvent0.getOldKey();
      assertEquals(0, featureChangeEvent0.getType());
  }

  @Test(timeout = 4000)
  public void test04()  throws Throwable  {
      Key key0 = mock(Key.class, new ViolatedAssumptionAnswer());
      Location location0 = mock(Location.class, new ViolatedAssumptionAnswer());
      doReturn((String) null).when(location0).toString();
      Feature feature0 = mock(Feature.class, new ViolatedAssumptionAnswer());
      doReturn(key0).when(feature0).getKey();
      doReturn(location0).when(feature0).getLocation();
      doReturn((QualifierVector) null).when(feature0).getQualifiers();
      Key key1 = mock(Key.class, new ViolatedAssumptionAnswer());
      Location location1 = mock(Location.class, new ViolatedAssumptionAnswer());
      FeatureChangeEvent featureChangeEvent0 = new FeatureChangeEvent("", feature0, key1, location1, (QualifierVector) null, 1552);
      featureChangeEvent0.getNewLocation();
      assertEquals(1552, featureChangeEvent0.getType());
  }

  @Test(timeout = 4000)
  public void test05()  throws Throwable  {
      Feature feature0 = mock(Feature.class, new ViolatedAssumptionAnswer());
      doReturn((Key) null).when(feature0).getKey();
      doReturn((Location) null).when(feature0).getLocation();
      doReturn((QualifierVector) null).when(feature0).getQualifiers();
      Key key0 = mock(Key.class, new ViolatedAssumptionAnswer());
      Location location0 = mock(Location.class, new ViolatedAssumptionAnswer());
      FeatureChangeEvent featureChangeEvent0 = new FeatureChangeEvent("", feature0, key0, location0, (QualifierVector) null, (-1839));
      featureChangeEvent0.getNewKey();
      assertEquals((-1839), featureChangeEvent0.getType());
  }

  @Test(timeout = 4000)
  public void test06()  throws Throwable  {
      Key key0 = mock(Key.class, new ViolatedAssumptionAnswer());
      Location location0 = mock(Location.class, new ViolatedAssumptionAnswer());
      FeatureChangeEvent featureChangeEvent0 = null;
      try {
        featureChangeEvent0 = new FeatureChangeEvent("&@DYe}]72=s41$YU5", (Feature) null, key0, location0, (QualifierVector) null, 0);
        fail("Expecting exception: NullPointerException");
      
      } catch(NullPointerException e) {
         //
         // no message in exception (getMessage() returned null)
         //
         verifyException("uk.ac.sanger.artemis.FeatureChangeEvent", e);
      }
  }

  @Test(timeout = 4000)
  public void test07()  throws Throwable  {
      Key key0 = mock(Key.class, new ViolatedAssumptionAnswer());
      Location location0 = mock(Location.class, new ViolatedAssumptionAnswer());
      Feature feature0 = mock(Feature.class, new ViolatedAssumptionAnswer());
      doReturn(key0).when(feature0).getKey();
      doReturn(location0).when(feature0).getLocation();
      doReturn((QualifierVector) null).when(feature0).getQualifiers();
      Key key1 = mock(Key.class, new ViolatedAssumptionAnswer());
      Location location1 = mock(Location.class, new ViolatedAssumptionAnswer());
      FeatureChangeEvent featureChangeEvent0 = new FeatureChangeEvent("", feature0, key1, location1, (QualifierVector) null, 1552);
      featureChangeEvent0.getOldQualifiers();
      assertEquals(1552, featureChangeEvent0.getType());
  }

  @Test(timeout = 4000)
  public void test08()  throws Throwable  {
      Feature feature0 = mock(Feature.class, new ViolatedAssumptionAnswer());
      doReturn((Key) null).when(feature0).getKey();
      doReturn((Location) null).when(feature0).getLocation();
      doReturn((QualifierVector) null).when(feature0).getQualifiers();
      Key key0 = mock(Key.class, new ViolatedAssumptionAnswer());
      Location location0 = mock(Location.class, new ViolatedAssumptionAnswer());
      FeatureChangeEvent featureChangeEvent0 = new FeatureChangeEvent("FT   ", feature0, key0, location0, (QualifierVector) null, (-1));
      featureChangeEvent0.getNewLocation();
      assertEquals((-1), featureChangeEvent0.getType());
  }

  @Test(timeout = 4000)
  public void test09()  throws Throwable  {
      Feature feature0 = mock(Feature.class, new ViolatedAssumptionAnswer());
      doReturn((Key) null).when(feature0).getKey();
      doReturn((Location) null).when(feature0).getLocation();
      doReturn((QualifierVector) null).when(feature0).getQualifiers();
      Key key0 = mock(Key.class, new ViolatedAssumptionAnswer());
      FeatureChangeEvent featureChangeEvent0 = new FeatureChangeEvent("tw7z};L,dX", feature0, key0, (Location) null, (QualifierVector) null, 16);
      featureChangeEvent0.getOldLocation();
      assertEquals(16, featureChangeEvent0.getType());
  }

  @Test(timeout = 4000)
  public void test10()  throws Throwable  {
      Key key0 = mock(Key.class, new ViolatedAssumptionAnswer());
      doReturn((String) null).when(key0).toString();
      Feature feature0 = mock(Feature.class, new ViolatedAssumptionAnswer());
      doReturn(key0).when(feature0).getKey();
      doReturn((Location) null).when(feature0).getLocation();
      doReturn((QualifierVector) null).when(feature0).getQualifiers();
      Key key1 = mock(Key.class, new ViolatedAssumptionAnswer());
      doReturn((String) null, (String) null).when(key1).toString();
      FeatureChangeEvent featureChangeEvent0 = new FeatureChangeEvent("", feature0, key1, (Location) null, (QualifierVector) null, 4);
      boolean boolean0 = featureChangeEvent0.featureHasChanged();
      assertEquals(4, featureChangeEvent0.getType());
      assertTrue(boolean0);
  }

  @Test(timeout = 4000)
  public void test11()  throws Throwable  {
      Feature feature0 = mock(Feature.class, new ViolatedAssumptionAnswer());
      doReturn((Key) null).when(feature0).getKey();
      doReturn((Location) null).when(feature0).getLocation();
      doReturn((QualifierVector) null).when(feature0).getQualifiers();
      doReturn((String) null).when(feature0).toString();
      Location location0 = mock(Location.class, new ViolatedAssumptionAnswer());
      FeatureChangeEvent featureChangeEvent0 = new FeatureChangeEvent("RNA", feature0, (Key) null, location0, (QualifierVector) null, 0);
      featureChangeEvent0.getFeature();
      assertEquals(0, featureChangeEvent0.getType());
  }

  @Test(timeout = 4000)
  public void test12()  throws Throwable  {
      Feature feature0 = mock(Feature.class, new ViolatedAssumptionAnswer());
      doReturn((Key) null).when(feature0).getKey();
      doReturn((Location) null).when(feature0).getLocation();
      doReturn((QualifierVector) null).when(feature0).getQualifiers();
      Location location0 = mock(Location.class, new ViolatedAssumptionAnswer());
      FeatureChangeEvent featureChangeEvent0 = new FeatureChangeEvent("RNA", feature0, (Key) null, location0, (QualifierVector) null, 0);
      featureChangeEvent0.getNewQualifiers();
      assertEquals(0, featureChangeEvent0.getType());
  }

  @Test(timeout = 4000)
  public void test13()  throws Throwable  {
      Key key0 = mock(Key.class, new ViolatedAssumptionAnswer());
      doReturn("", "", "").when(key0).toString();
      Location location0 = mock(Location.class, new ViolatedAssumptionAnswer());
      Feature feature0 = mock(Feature.class, new ViolatedAssumptionAnswer());
      doReturn(key0).when(feature0).getKey();
      doReturn(location0).when(feature0).getLocation();
      doReturn((QualifierVector) null).when(feature0).getQualifiers();
      FeatureChangeEvent featureChangeEvent0 = new FeatureChangeEvent("", feature0, key0, (Location) null, (QualifierVector) null, 2);
      boolean boolean0 = featureChangeEvent0.featureHasChanged();
      assertEquals(2, featureChangeEvent0.getType());
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test14()  throws Throwable  {
      Feature feature0 = mock(Feature.class, new ViolatedAssumptionAnswer());
      doReturn((Key) null).when(feature0).getKey();
      doReturn((Location) null).when(feature0).getLocation();
      doReturn((QualifierVector) null).when(feature0).getQualifiers();
      Location location0 = mock(Location.class, new ViolatedAssumptionAnswer());
      doReturn("RNA", "RNA").when(location0).toString();
      FeatureChangeEvent featureChangeEvent0 = new FeatureChangeEvent("RNA", feature0, (Key) null, location0, (QualifierVector) null, 0);
      boolean boolean0 = featureChangeEvent0.featureHasChanged();
      assertEquals(0, featureChangeEvent0.getType());
      assertTrue(boolean0);
  }

  @Test(timeout = 4000)
  public void test15()  throws Throwable  {
      Feature feature0 = mock(Feature.class, new ViolatedAssumptionAnswer());
      doReturn((Key) null).when(feature0).getKey();
      doReturn((Location) null).when(feature0).getLocation();
      doReturn((QualifierVector) null).when(feature0).getQualifiers();
      Location location0 = mock(Location.class, new ViolatedAssumptionAnswer());
      FeatureChangeEvent featureChangeEvent0 = new FeatureChangeEvent("RNA", feature0, (Key) null, location0, (QualifierVector) null, 0);
      int int0 = featureChangeEvent0.getType();
      assertEquals(0, int0);
  }

  @Test(timeout = 4000)
  public void test16()  throws Throwable  {
      Feature feature0 = mock(Feature.class, new ViolatedAssumptionAnswer());
      Key key0 = mock(Key.class, new ViolatedAssumptionAnswer());
      Location location0 = mock(Location.class, new ViolatedAssumptionAnswer());
      FeatureChangeEvent featureChangeEvent0 = null;
      try {
        featureChangeEvent0 = new FeatureChangeEvent((Object) null, feature0, key0, location0, (QualifierVector) null, 47);
        fail("Expecting exception: IllegalArgumentException");
      
      } catch(IllegalArgumentException e) {
         //
         // null source
         //
         verifyException("java.util.EventObject", e);
      }
  }
}
