/*
 * This file was automatically generated by EvoSuite
 * Thu Sep 20 12:53:10 GMT 2018
 */

package uk.ac.sanger.artemis.components.alignment;

import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.shaded.org.mockito.Mockito.*;
import static org.evosuite.runtime.EvoAssertions.*;
import java.awt.GraphicsConfiguration;
import java.awt.HeadlessException;
import javax.swing.Box;
import javax.swing.JFrame;
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.components.FeatureDisplay;
import uk.ac.sanger.artemis.components.alignment.ReadCountDialog;
import uk.ac.sanger.artemis.io.Qualifier;
import uk.ac.sanger.artemis.util.StringVector;

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

  @Test(timeout = 4000)
  public void test0()  throws Throwable  {
      Qualifier qualifier0 = mock(Qualifier.class, new ViolatedAssumptionAnswer());
      doReturn((StringVector) null, (StringVector) null, (StringVector) null, (StringVector) null, (StringVector) null).when(qualifier0).getValues();
      Feature feature0 = mock(Feature.class, new ViolatedAssumptionAnswer());
      doReturn("H").when(feature0).getIDString();
      doReturn(qualifier0, qualifier0, qualifier0, qualifier0, qualifier0).when(feature0).getQualifierByName(anyString());
      ReadCountDialog.getFeatureName(feature0);
  }

  @Test(timeout = 4000)
  public void test1()  throws Throwable  {
      // Undeclared exception!
      try { 
        ReadCountDialog.getFeatureName((Feature) null);
        fail("Expecting exception: NullPointerException");
      
      } catch(NullPointerException e) {
         //
         // no message in exception (getMessage() returned null)
         //
         verifyException("uk.ac.sanger.artemis.components.alignment.ReadCountDialog", e);
      }
  }

  @Test(timeout = 4000)
  public void test2()  throws Throwable  {
      JFrame jFrame0 = mock(JFrame.class, new ViolatedAssumptionAnswer());
      doReturn((GraphicsConfiguration) null).when(jFrame0).getGraphicsConfiguration();
      FeatureDisplay featureDisplay0 = mock(FeatureDisplay.class, new ViolatedAssumptionAnswer());
      Box box0 = mock(Box.class, new ViolatedAssumptionAnswer());
      ReadCountDialog readCountDialog0 = null;
      try {
        readCountDialog0 = new ReadCountDialog(jFrame0, (String) null, featureDisplay0, box0);
        fail("Expecting exception: HeadlessException");
      
      } catch(HeadlessException e) {
         //
         // no message in exception (getMessage() returned null)
         //
         verifyException("java.awt.GraphicsEnvironment", e);
      }
  }

  @Test(timeout = 4000)
  public void test3()  throws Throwable  {
      Qualifier qualifier0 = mock(Qualifier.class, new ViolatedAssumptionAnswer());
      doReturn((StringVector) null, (StringVector) null, (StringVector) null, (StringVector) null, (StringVector) null).when(qualifier0).getValues();
      Feature feature0 = mock(Feature.class, new ViolatedAssumptionAnswer());
      doReturn("").when(feature0).getIDString();
      doReturn(qualifier0, qualifier0, qualifier0, qualifier0, qualifier0).when(feature0).getQualifierByName(anyString());
      ReadCountDialog.getFeatureName(feature0);
  }

  @Test(timeout = 4000)
  public void test4()  throws Throwable  {
      Feature feature0 = mock(Feature.class, new ViolatedAssumptionAnswer());
      doReturn((String) null).when(feature0).getIDString();
      doReturn((Qualifier) null, (Qualifier) null, (Qualifier) null, (Qualifier) null, (Qualifier) null).when(feature0).getQualifierByName(anyString());
      ReadCountDialog.getFeatureName(feature0);
      Feature feature1 = mock(Feature.class, new ViolatedAssumptionAnswer());
      doReturn((String) null).when(feature1).getIDString();
      doReturn((Qualifier) null, (Qualifier) null, (Qualifier) null, (Qualifier) null, (Qualifier) null).when(feature1).getQualifierByName(anyString());
      ReadCountDialog.getFeatureName(feature1);
  }
}
