/*
 * This file was automatically generated by EvoSuite
 * Wed Sep 19 19:35:48 GMT 2018
 */

package uk.ac.sanger.artemis.components.genebuilder.cv;

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.gmod.schema.cv.CvTerm;
import org.junit.runner.RunWith;
import uk.ac.sanger.artemis.components.genebuilder.cv.CvTermsComparator;

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

  @Test(timeout = 4000)
  public void test0()  throws Throwable  {
      CvTermsComparator cvTermsComparator0 = new CvTermsComparator();
      CvTerm cvTerm0 = mock(CvTerm.class, new ViolatedAssumptionAnswer());
      doReturn((String) null).when(cvTerm0).getName();
      CvTerm cvTerm1 = mock(CvTerm.class, new ViolatedAssumptionAnswer());
      // Undeclared exception!
      try { 
        cvTermsComparator0.compare(cvTerm0, cvTerm1);
        fail("Expecting exception: NullPointerException");
      
      } catch(NullPointerException e) {
         //
         // no message in exception (getMessage() returned null)
         //
         verifyException("uk.ac.sanger.artemis.components.genebuilder.cv.CvTermsComparator", e);
      }
  }

  @Test(timeout = 4000)
  public void test1()  throws Throwable  {
      CvTermsComparator cvTermsComparator0 = new CvTermsComparator();
      CvTerm cvTerm0 = mock(CvTerm.class, new ViolatedAssumptionAnswer());
      doReturn(".n/#&3Y465El 9A~;", "").when(cvTerm0).getName();
      int int0 = cvTermsComparator0.compare(cvTerm0, cvTerm0);
      assertEquals(18, int0);
  }

  @Test(timeout = 4000)
  public void test2()  throws Throwable  {
      CvTermsComparator cvTermsComparator0 = new CvTermsComparator();
      CvTerm cvTerm0 = mock(CvTerm.class, new ViolatedAssumptionAnswer());
      doReturn("v,1-", "XtnDTqNV$<(").when(cvTerm0).getName();
      int int0 = cvTermsComparator0.compare(cvTerm0, cvTerm0);
      assertEquals((-2), int0);
  }
}
