/*
 * This file was automatically generated by EvoSuite
 * Wed Sep 19 22:15:56 GMT 2018
 */

package uk.ac.sanger.artemis.io;

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.io.FeatureHeader;
import uk.ac.sanger.artemis.util.LinePushBackReader;

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

  @Test(timeout = 4000)
  public void test0()  throws Throwable  {
      LinePushBackReader linePushBackReader0 = mock(LinePushBackReader.class, new ViolatedAssumptionAnswer());
      doReturn("5?_4CP& vwQ%").when(linePushBackReader0).readLine();
      FeatureHeader featureHeader0 = new FeatureHeader(linePushBackReader0);
      assertNotNull(featureHeader0);
      assertEquals("", featureHeader0.getLine());
  }

  @Test(timeout = 4000)
  public void test1()  throws Throwable  {
      LinePushBackReader linePushBackReader0 = mock(LinePushBackReader.class, new ViolatedAssumptionAnswer());
      doReturn("mac").when(linePushBackReader0).readLine();
      FeatureHeader featureHeader0 = null;
      try {
        featureHeader0 = new FeatureHeader(linePushBackReader0);
        fail("Expecting exception: StringIndexOutOfBoundsException");
      
      } catch(StringIndexOutOfBoundsException e) {
      }
  }

  @Test(timeout = 4000)
  public void test2()  throws Throwable  {
      FeatureHeader featureHeader0 = null;
      try {
        featureHeader0 = new FeatureHeader((LinePushBackReader) null);
        fail("Expecting exception: NullPointerException");
      
      } catch(NullPointerException e) {
         //
         // no message in exception (getMessage() returned null)
         //
         verifyException("uk.ac.sanger.artemis.io.FeatureHeader", e);
      }
  }

  @Test(timeout = 4000)
  public void test3()  throws Throwable  {
      LinePushBackReader linePushBackReader0 = mock(LinePushBackReader.class, new ViolatedAssumptionAnswer());
      doReturn("FH", "FH", "<").when(linePushBackReader0).readLine();
      FeatureHeader featureHeader0 = new FeatureHeader(linePushBackReader0);
      assertEquals("FH\nFH", featureHeader0.getLine());
  }

  @Test(timeout = 4000)
  public void test4()  throws Throwable  {
      LinePushBackReader linePushBackReader0 = mock(LinePushBackReader.class, new ViolatedAssumptionAnswer());
      doReturn((String) null).when(linePushBackReader0).readLine();
      FeatureHeader featureHeader0 = new FeatureHeader(linePushBackReader0);
      assertEquals("", featureHeader0.getLine());
  }
}
