/*
 * This file was automatically generated by EvoSuite
 * Thu Sep 20 13:48:38 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.FeaturePatternPredicate;
import uk.ac.sanger.artemis.sequence.AminoAcidSequence;

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

  @Test(timeout = 4000)
  public void test0()  throws Throwable  {
      AminoAcidSequence aminoAcidSequence0 = mock(AminoAcidSequence.class, new ViolatedAssumptionAnswer());
      doReturn(true).when(aminoAcidSequence0).checkForMatch(any(uk.ac.sanger.artemis.sequence.AminoAcidSequence.class));
      FeaturePatternPredicate featurePatternPredicate0 = new FeaturePatternPredicate(aminoAcidSequence0);
      AminoAcidSequence aminoAcidSequence1 = mock(AminoAcidSequence.class, new ViolatedAssumptionAnswer());
      Feature feature0 = mock(Feature.class, new ViolatedAssumptionAnswer());
      doReturn(aminoAcidSequence1).when(feature0).getTranslation();
      boolean boolean0 = featurePatternPredicate0.testPredicate(feature0);
      assertTrue(boolean0);
  }

  @Test(timeout = 4000)
  public void test1()  throws Throwable  {
      AminoAcidSequence aminoAcidSequence0 = mock(AminoAcidSequence.class, new ViolatedAssumptionAnswer());
      doReturn(false).when(aminoAcidSequence0).checkForMatch(any(uk.ac.sanger.artemis.sequence.AminoAcidSequence.class));
      FeaturePatternPredicate featurePatternPredicate0 = new FeaturePatternPredicate(aminoAcidSequence0);
      Feature feature0 = mock(Feature.class, new ViolatedAssumptionAnswer());
      doReturn((AminoAcidSequence) null).when(feature0).getTranslation();
      boolean boolean0 = featurePatternPredicate0.testPredicate(feature0);
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test2()  throws Throwable  {
      AminoAcidSequence aminoAcidSequence0 = mock(AminoAcidSequence.class, new ViolatedAssumptionAnswer());
      FeaturePatternPredicate featurePatternPredicate0 = new FeaturePatternPredicate(aminoAcidSequence0);
      // Undeclared exception!
      try { 
        featurePatternPredicate0.testPredicate((Feature) null);
        fail("Expecting exception: NullPointerException");
      
      } catch(NullPointerException e) {
         //
         // no message in exception (getMessage() returned null)
         //
         verifyException("uk.ac.sanger.artemis.FeaturePatternPredicate", e);
      }
  }
}
