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

package uk.ac.sanger.artemis.j2ssh;

import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.shaded.org.mockito.Mockito.*;
import static org.evosuite.runtime.EvoAssertions.*;
import javax.swing.JProgressBar;
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.j2ssh.FTProgress;

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

  @Test(timeout = 4000)
  public void test0()  throws Throwable  {
      JProgressBar jProgressBar0 = mock(JProgressBar.class, new ViolatedAssumptionAnswer());
      FTProgress fTProgress0 = new FTProgress(jProgressBar0, "I");
      fTProgress0.started(696, "I");
      fTProgress0.progressed(696);
      assertFalse(fTProgress0.isCancelled());
  }

  @Test(timeout = 4000)
  public void test1()  throws Throwable  {
      JProgressBar jProgressBar0 = mock(JProgressBar.class, new ViolatedAssumptionAnswer());
      doReturn(0).when(jProgressBar0).getValue();
      FTProgress fTProgress0 = new FTProgress(jProgressBar0, (String) null);
      long long0 = fTProgress0.getProgress();
      assertEquals(0L, long0);
  }

  @Test(timeout = 4000)
  public void test2()  throws Throwable  {
      JProgressBar jProgressBar0 = mock(JProgressBar.class, new ViolatedAssumptionAnswer());
      doReturn(696).when(jProgressBar0).getValue();
      FTProgress fTProgress0 = new FTProgress(jProgressBar0, "I");
      long long0 = fTProgress0.getProgress();
      assertEquals(696L, long0);
  }

  @Test(timeout = 4000)
  public void test3()  throws Throwable  {
      FTProgress fTProgress0 = new FTProgress((JProgressBar) null, "uk.ac.sanger.artemis.j2ssh.FTProgress");
      // Undeclared exception!
      try { 
        fTProgress0.started(0L, "uk.ac.sanger.artemis.j2ssh.FTProgress");
        fail("Expecting exception: NullPointerException");
      
      } catch(NullPointerException e) {
         //
         // no message in exception (getMessage() returned null)
         //
         verifyException("uk.ac.sanger.artemis.j2ssh.FTProgress", e);
      }
  }

  @Test(timeout = 4000)
  public void test4()  throws Throwable  {
      FTProgress fTProgress0 = new FTProgress((JProgressBar) null, "42=a{");
      // Undeclared exception!
      try { 
        fTProgress0.progressed(0L);
        fail("Expecting exception: NullPointerException");
      
      } catch(NullPointerException e) {
         //
         // no message in exception (getMessage() returned null)
         //
         verifyException("uk.ac.sanger.artemis.j2ssh.FTProgress", e);
      }
  }

  @Test(timeout = 4000)
  public void test5()  throws Throwable  {
      FTProgress fTProgress0 = new FTProgress((JProgressBar) null, ",pN}-FMR_D&okz]Dc");
      // Undeclared exception!
      try { 
        fTProgress0.getProgress();
        fail("Expecting exception: NullPointerException");
      
      } catch(NullPointerException e) {
         //
         // no message in exception (getMessage() returned null)
         //
         verifyException("uk.ac.sanger.artemis.j2ssh.FTProgress", e);
      }
  }

  @Test(timeout = 4000)
  public void test6()  throws Throwable  {
      JProgressBar jProgressBar0 = mock(JProgressBar.class, new ViolatedAssumptionAnswer());
      FTProgress fTProgress0 = new FTProgress(jProgressBar0, "I");
      // Undeclared exception!
      try { 
        fTProgress0.progressed(696);
        fail("Expecting exception: ArithmeticException");
      
      } catch(ArithmeticException e) {
         //
         // / by zero
         //
         verifyException("uk.ac.sanger.artemis.j2ssh.FTProgress", e);
      }
  }

  @Test(timeout = 4000)
  public void test7()  throws Throwable  {
      JProgressBar jProgressBar0 = mock(JProgressBar.class, new ViolatedAssumptionAnswer());
      FTProgress fTProgress0 = new FTProgress(jProgressBar0, "I");
      fTProgress0.completed();
      assertFalse(fTProgress0.isCancelled());
  }

  @Test(timeout = 4000)
  public void test8()  throws Throwable  {
      JProgressBar jProgressBar0 = mock(JProgressBar.class, new ViolatedAssumptionAnswer());
      doReturn((-1136)).when(jProgressBar0).getValue();
      FTProgress fTProgress0 = new FTProgress(jProgressBar0, "");
      long long0 = fTProgress0.getProgress();
      assertEquals((-1136L), long0);
  }

  @Test(timeout = 4000)
  public void test9()  throws Throwable  {
      JProgressBar jProgressBar0 = mock(JProgressBar.class, new ViolatedAssumptionAnswer());
      FTProgress fTProgress0 = new FTProgress(jProgressBar0, "");
      boolean boolean0 = fTProgress0.isCancelled();
      assertFalse(boolean0);
  }
}
