/*
 * This file was automatically generated by EvoSuite
 * Fri Jun 08 18:17:14 GMT 2018
 */

package uk.ac.sanger.artemis.components;

import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import java.awt.HeadlessException;
import javax.swing.JFrame;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
import uk.ac.sanger.artemis.components.DbfetchEntrySource;
import uk.ac.sanger.artemis.sequence.Bases;

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

  @Test(timeout = 4000)
  public void test0()  throws Throwable  {
      DbfetchEntrySource dbfetchEntrySource0 = new DbfetchEntrySource((JFrame) null);
      // Undeclared exception!
      try { 
        dbfetchEntrySource0.getEntry((Bases) null, false);
        fail("Expecting exception: HeadlessException");
      
      } catch(HeadlessException e) {
         //
         // no message in exception (getMessage() returned null)
         //
         verifyException("java.awt.GraphicsEnvironment", e);
      }
  }

  @Test(timeout = 4000)
  public void test1()  throws Throwable  {
      DbfetchEntrySource dbfetchEntrySource0 = new DbfetchEntrySource((JFrame) null);
      // Undeclared exception!
      try { 
        dbfetchEntrySource0.constructEbiUrl((String) null);
        fail("Expecting exception: NullPointerException");
      
      } catch(NullPointerException e) {
         //
         // no message in exception (getMessage() returned null)
         //
      }
  }

  @Test(timeout = 4000)
  public void test2()  throws Throwable  {
      DbfetchEntrySource dbfetchEntrySource0 = new DbfetchEntrySource((JFrame) null);
      JFrame jFrame0 = dbfetchEntrySource0.getFrame();
      assertNull(jFrame0);
  }

  @Test(timeout = 4000)
  public void test3()  throws Throwable  {
      DbfetchEntrySource dbfetchEntrySource0 = new DbfetchEntrySource((JFrame) null);
      String string0 = dbfetchEntrySource0.constructEbiUrl("AA_0");
      assertNotNull(string0);
      assertEquals("https://www.ebi.ac.uk/Tools/dbfetch/dbfetch?db=refseqn&id=AA_0&format=fasta&style=raw", string0);
  }

  @Test(timeout = 4000)
  public void test4()  throws Throwable  {
      DbfetchEntrySource dbfetchEntrySource0 = new DbfetchEntrySource((JFrame) null);
      String string0 = dbfetchEntrySource0.constructEbiUrl("a7");
      assertNotNull(string0);
      assertEquals("https://www.ebi.ac.uk/Tools/dbfetch/dbfetch?db=ena_sequence&id=a7&format=embl&style=raw", string0);
  }

  @Test(timeout = 4000)
  public void test5()  throws Throwable  {
      DbfetchEntrySource dbfetchEntrySource0 = new DbfetchEntrySource((JFrame) null);
      String string0 = dbfetchEntrySource0.constructEbiUrl("A_0");
      assertNull(string0);
  }

  @Test(timeout = 4000)
  public void test6()  throws Throwable  {
      DbfetchEntrySource dbfetchEntrySource0 = new DbfetchEntrySource((JFrame) null);
      // Undeclared exception!
      try { 
        dbfetchEntrySource0.getEntry(true);
        fail("Expecting exception: HeadlessException");
      
      } catch(HeadlessException e) {
         //
         // no message in exception (getMessage() returned null)
         //
         verifyException("java.awt.GraphicsEnvironment", e);
      }
  }

  @Test(timeout = 4000)
  public void test7()  throws Throwable  {
      DbfetchEntrySource dbfetchEntrySource0 = new DbfetchEntrySource((JFrame) null);
      boolean boolean0 = dbfetchEntrySource0.isFullEntrySource();
      assertTrue(boolean0);
  }

  @Test(timeout = 4000)
  public void test8()  throws Throwable  {
      DbfetchEntrySource dbfetchEntrySource0 = new DbfetchEntrySource((JFrame) null);
      String string0 = dbfetchEntrySource0.getSourceName();
      assertEquals("EBI - Dbfetch", string0);
  }
}
