content: /*
   * This file was automatically generated by EvoSuite
   */
  
  package com.lts.util.zip;
  
  import org.junit.Test;
  import org.junit.runner.RunWith;
  import org.evosuite.junit.EvoSuiteRunner;
  import static org.junit.Assert.*;
  import com.lts.LTSException;
  import com.lts.util.zip.SimpleZipFile;
  import java.io.File;
  import java.util.LinkedList;
  import java.util.List;
  import java.util.concurrent.ExecutorService;
  import java.util.concurrent.Executors;
  import java.util.concurrent.Future;
  import java.util.concurrent.TimeUnit;
  import org.evosuite.Properties.SandboxMode;
  import org.evosuite.sandbox.Sandbox;
  import org.junit.After;
  import org.junit.AfterClass;
  import org.junit.Before;
  import org.junit.BeforeClass;
  
  @RunWith(EvoSuiteRunner.class)
  public class SimpleZipFileEvoSuiteTest {
  
    private static ExecutorService executor; 
  
    @BeforeClass 
    public static void initEvoSuiteFramework(){ 
      org.evosuite.Properties.REPLACE_CALLS = true; 
      org.evosuite.Properties.SANDBOX_MODE = SandboxMode.RECOMMENDED; 
      Sandbox.initializeSecurityManagerForSUT(); 
      executor = Executors.newCachedThreadPool(); 
    } 
  
    @AfterClass 
    public static void clearEvoSuiteFramework(){ 
      executor.shutdownNow(); 
      Sandbox.resetDefaultSecurityManager(); 
    } 
  
    @Before 
    public void initTestCase(){ 
      Sandbox.goingToExecuteSUTCode(); 
    } 
  
    @After 
    public void doneWithTestCase(){ 
      Sandbox.doneWithExecutingSUTCode(); 
    } 
  
  
    @Test
    public void test0()  throws Throwable  {
        SimpleZipFile simpleZipFile0 = new SimpleZipFile("");
        File file0 = simpleZipFile0.getFile();
        // Undeclared exception!
        try {
          simpleZipFile0.addDirectory(file0);
          fail("Expecting exception: IllegalStateException");
        } catch(IllegalStateException e) {
          /*
           * basedir does not exist
           */
        }
    }
  
    @Test
    public void test1()  throws Throwable  {
        SimpleZipFile simpleZipFile0 = new SimpleZipFile((File) null);
        simpleZipFile0.setUpdateImmediately(false);
        assertEquals(false, simpleZipFile0.updateImmediately());
    }
  
    @Test
    public void test2()  throws Throwable  {
        SimpleZipFile simpleZipFile0 = new SimpleZipFile("tempzipfile");
        simpleZipFile0.addFile("tempzipfile");
        assertEquals(false, simpleZipFile0.shouldCreateBackup());
    }
  
    @Test
    public void test3()  throws Throwable  {
      Future<?> future = executor.submit(new Runnable(){ 
              public void run() { 
          try {
            SimpleZipFile simpleZipFile0 = new SimpleZipFile((File) null);
            // Undeclared exception!
            try {
              simpleZipFile0.addFile("Error reading file, ", true);
              fail("Expecting exception: SecurityException");
            } catch(SecurityException e) {
              /*
               * Security manager blocks (java.io.FilePermission tempzipfile write)
               * java.lang.Thread.getStackTrace(Thread.java:1479)
               * org.evosuite.sandbox.MSecurityManager.checkPermission(MSecurityManager.java:303)
               * java.lang.SecurityManager.checkWrite(SecurityManager.java:962)
               * java.io.FileOutputStream.<init>(FileOutputStream.java:183)
               * java.io.FileOutputStream.<init>(FileOutputStream.java:145)
               * com.lts.util.zip.SimpleZipFile.createZipfile(SimpleZipFile.java:247)
               * com.lts.util.zip.SimpleZipFile.createZipfile(SimpleZipFile.java:306)
               * com.lts.util.zip.SimpleZipFile.addFile(SimpleZipFile.java:319)
               * com.lts.util.zip.SimpleZipFile.addFile(SimpleZipFile.java:333)
               * sun.reflect.GeneratedMethodAccessor77.invoke(Unknown Source)
               * sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               * java.lang.reflect.Method.invoke(Method.java:597)
               * org.evosuite.testcase.MethodStatement$1.execute(MethodStatement.java:262)
               * org.evosuite.testcase.AbstractStatement.exceptionHandler(AbstractStatement.java:142)
               * org.evosuite.testcase.MethodStatement.execute(MethodStatement.java:217)
               * org.evosuite.testcase.TestRunnable.call(TestRunnable.java:291)
               * org.evosuite.testcase.TestRunnable.call(TestRunnable.java:44)
               * java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
               * java.util.concurrent.FutureTask.run(FutureTask.java:138)
               * java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
               * java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
               * java.lang.Thread.run(Thread.java:662)
               */
            }
          } catch(Throwable t) {
              // Need to catch declared exceptions
          }
        } 
      }); 
      future.get(6000, TimeUnit.MILLISECONDS); 
    }
  
    @Test
    public void test4()  throws Throwable  {
        SimpleZipFile simpleZipFile0 = new SimpleZipFile("");
        File file0 = simpleZipFile0.getFile();
        File file1 = file0.getAbsoluteFile();
        simpleZipFile0.addFile(file1);
        assertEquals(true, simpleZipFile0.updateRequired());
    }
  
    @Test
    public void test5()  throws Throwable  {
        SimpleZipFile simpleZipFile0 = new SimpleZipFile("tempzipfile");
        // Undeclared exception!
        try {
          simpleZipFile0.addDirectory("tempzipfile");
          fail("Expecting exception: IllegalStateException");
        } catch(IllegalStateException e) {
          /*
           * basedir does not exist
           */
        }
    }
  
    @Test
    public void test6()  throws Throwable  {
        SimpleZipFile simpleZipFile0 = new SimpleZipFile((File) null);
        simpleZipFile0.setShouldCreateBackup(false);
        assertEquals(false, simpleZipFile0.shouldCreateBackup());
    }
  
    @Test
    public void test7()  throws Throwable  {
        SimpleZipFile simpleZipFile0 = new SimpleZipFile("");
        simpleZipFile0.setIgnoreMissingFiles(false);
        assertEquals(false, simpleZipFile0.ignoreMissingFiles());
    }
  
    @Test
    public void test8()  throws Throwable  {
        SimpleZipFile simpleZipFile0 = new SimpleZipFile("");
        LinkedList<Integer> linkedList0 = new LinkedList<Integer>();
        simpleZipFile0.setFileList((List) linkedList0);
        assertEquals(0, linkedList0.size());
    }
  
    @Test
    public void test9()  throws Throwable  {
        SimpleZipFile simpleZipFile0 = new SimpleZipFile("tempzipfile");
        boolean boolean0 = simpleZipFile0.updateRequired();
        assertEquals(false, boolean0);
    }
  
    @Test
    public void test10()  throws Throwable  {
        SimpleZipFile simpleZipFile0 = new SimpleZipFile("tempzipfile");
        boolean boolean0 = simpleZipFile0.ignoreMissingFiles();
        assertEquals(false, boolean0);
    }
  
    @Test
    public void test11()  throws Throwable  {
        SimpleZipFile simpleZipFile0 = new SimpleZipFile((File) null);
        simpleZipFile0.basicAddFile((String) null, (String) null);
        assertEquals(true, simpleZipFile0.updateRequired());
    }
  }
  