/*
 * This file was automatically generated by EvoSuite
 * Thu Sep 20 12:57:37 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.FeatureKeyQualifierPredicate;
import uk.ac.sanger.artemis.io.Key;
import uk.ac.sanger.artemis.io.Qualifier;

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

  @Test(timeout = 4000)
  public void test0()  throws Throwable  {
      FeatureKeyQualifierPredicate featureKeyQualifierPredicate0 = new FeatureKeyQualifierPredicate((Key) null, "", "", true, true, true);
  }

  @Test(timeout = 4000)
  public void test1()  throws Throwable  {
      Key key0 = mock(Key.class, new ViolatedAssumptionAnswer());
      FeatureKeyQualifierPredicate featureKeyQualifierPredicate0 = null;
      try {
        featureKeyQualifierPredicate0 = new FeatureKeyQualifierPredicate(key0, "", (String) null, true, true, true);
        fail("Expecting exception: NullPointerException");
      
      } catch(NullPointerException e) {
         //
         // no message in exception (getMessage() returned null)
         //
         verifyException("uk.ac.sanger.artemis.FeatureKeyQualifierPredicate", e);
      }
  }

  @Test(timeout = 4000)
  public void test2()  throws Throwable  {
      FeatureKeyQualifierPredicate featureKeyQualifierPredicate0 = new FeatureKeyQualifierPredicate((Key) null, (String) null, "TIME TAKEN ");
      // Undeclared exception!
      try { 
        featureKeyQualifierPredicate0.testPredicate((Feature) null);
        fail("Expecting exception: NullPointerException");
      
      } catch(NullPointerException e) {
         //
         // no message in exception (getMessage() returned null)
         //
         verifyException("uk.ac.sanger.artemis.FeatureKeyQualifierPredicate", e);
      }
  }

  @Test(timeout = 4000)
  public void test3()  throws Throwable  {
      FeatureKeyQualifierPredicate featureKeyQualifierPredicate0 = new FeatureKeyQualifierPredicate((Key) null, "lZ)g5", false);
      Feature feature0 = mock(Feature.class, new ViolatedAssumptionAnswer());
      doReturn((Qualifier) null).when(feature0).getQualifierByName(anyString());
      boolean boolean0 = featureKeyQualifierPredicate0.testPredicate(feature0);
      assertTrue(boolean0);
  }

  @Test(timeout = 4000)
  public void test4()  throws Throwable  {
      FeatureKeyQualifierPredicate featureKeyQualifierPredicate0 = new FeatureKeyQualifierPredicate((Key) null, "lZ)g5", false);
      Qualifier qualifier0 = mock(Qualifier.class, new ViolatedAssumptionAnswer());
      Feature feature0 = mock(Feature.class, new ViolatedAssumptionAnswer());
      doReturn(qualifier0).when(feature0).getQualifierByName(anyString());
      boolean boolean0 = featureKeyQualifierPredicate0.testPredicate(feature0);
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test5()  throws Throwable  {
      FeatureKeyQualifierPredicate featureKeyQualifierPredicate0 = new FeatureKeyQualifierPredicate((Key) null, "Y]G!7 RuXda+,Y ");
      Feature feature0 = mock(Feature.class, new ViolatedAssumptionAnswer());
      doReturn((Qualifier) null).when(feature0).getQualifierByName(anyString());
      boolean boolean0 = featureKeyQualifierPredicate0.testPredicate(feature0);
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test6()  throws Throwable  {
      FeatureKeyQualifierPredicate featureKeyQualifierPredicate0 = new FeatureKeyQualifierPredicate((Key) null, "", "", false, false, false);
      // Undeclared exception!
      try { 
        featureKeyQualifierPredicate0.testPredicate((Feature) null);
        fail("Expecting exception: NullPointerException");
      
      } catch(NullPointerException e) {
         //
         // no message in exception (getMessage() returned null)
         //
         verifyException("uk.ac.sanger.artemis.FeatureKeyQualifierPredicate", e);
      }
  }

  @Test(timeout = 4000)
  public void test7()  throws Throwable  {
      Key key0 = mock(Key.class, new ViolatedAssumptionAnswer());
      FeatureKeyQualifierPredicate featureKeyQualifierPredicate0 = null;
      try {
        featureKeyQualifierPredicate0 = new FeatureKeyQualifierPredicate(key0, (String) null, (String) null, true, true);
        fail("Expecting exception: NullPointerException");
      
      } catch(NullPointerException e) {
         //
         // no message in exception (getMessage() returned null)
         //
         verifyException("uk.ac.sanger.artemis.FeatureKeyQualifierPredicate", e);
      }
  }

  @Test(timeout = 4000)
  public void test8()  throws Throwable  {
      Key key0 = mock(Key.class, new ViolatedAssumptionAnswer());
      FeatureKeyQualifierPredicate featureKeyQualifierPredicate0 = new FeatureKeyQualifierPredicate(key0, (String) null, (String) null, false, false);
      Key key1 = mock(Key.class, new ViolatedAssumptionAnswer());
      Feature feature0 = mock(Feature.class, new ViolatedAssumptionAnswer());
      doReturn(key1).when(feature0).getKey();
      boolean boolean0 = featureKeyQualifierPredicate0.testPredicate(feature0);
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test9()  throws Throwable  {
      FeatureKeyQualifierPredicate featureKeyQualifierPredicate0 = new FeatureKeyQualifierPredicate((Key) null, "Y]G!7 RuXda+,Y ");
      Qualifier qualifier0 = mock(Qualifier.class, new ViolatedAssumptionAnswer());
      Feature feature0 = mock(Feature.class, new ViolatedAssumptionAnswer());
      doReturn(qualifier0).when(feature0).getQualifierByName(anyString());
      boolean boolean0 = featureKeyQualifierPredicate0.testPredicate(feature0);
      assertTrue(boolean0);
  }
}
