/*
 * This file was automatically generated by EvoSuite
 * Thu Sep 20 14:17:56 GMT 2018
 */

package uk.ac.sanger.artemis.util;

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.io.BufferedInputStream;
import java.io.InputStream;
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.util.DocumentBlockCompressed;

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

  @Test(timeout = 4000)
  public void test0()  throws Throwable  {
      BufferedInputStream bufferedInputStream0 = mock(BufferedInputStream.class, new ViolatedAssumptionAnswer());
      doReturn(true).when(bufferedInputStream0).markSupported();
      doReturn(0).when(bufferedInputStream0).read(any(byte[].class) , anyInt() , anyInt());
      boolean boolean0 = DocumentBlockCompressed.isValidFile(bufferedInputStream0);
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test1()  throws Throwable  {
      // Undeclared exception!
      try { 
        DocumentBlockCompressed.isValidFile((BufferedInputStream) null);
        fail("Expecting exception: NullPointerException");
      
      } catch(NullPointerException e) {
         //
         // no message in exception (getMessage() returned null)
         //
         verifyException("htsjdk.samtools.util.BlockCompressedInputStream", e);
      }
  }

  @Test(timeout = 4000)
  public void test2()  throws Throwable  {
      BufferedInputStream bufferedInputStream0 = mock(BufferedInputStream.class, new ViolatedAssumptionAnswer());
      doReturn(false).when(bufferedInputStream0).markSupported();
      // Undeclared exception!
      try { 
        DocumentBlockCompressed.isValidFile(bufferedInputStream0);
        fail("Expecting exception: RuntimeException");
      
      } catch(RuntimeException e) {
         //
         // Cannot test non-buffered stream
         //
         verifyException("htsjdk.samtools.util.BlockCompressedInputStream", e);
      }
  }

  @Test(timeout = 4000)
  public void test3()  throws Throwable  {
      InputStream inputStream0 = DocumentBlockCompressed.getBlockCompressedInputStream((BufferedInputStream) null);
      assertNotNull(inputStream0);
  }

  @Test(timeout = 4000)
  public void test4()  throws Throwable  {
      DocumentBlockCompressed documentBlockCompressed0 = new DocumentBlockCompressed();
  }
}
