content: /*
   * This file was automatically generated by EvoSuite
   */
  
  package com.lts.application;
  
  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.Suspender;
  import com.lts.application.Application;
  import com.lts.application.ApplicationException;
  import com.lts.application.ApplicationExceptionHandler;
  import com.lts.application.ApplicationTerminateException;
  import com.lts.application.RepositoryListener;
  import com.lts.application.RepositoryListenerAdapter;
  import com.lts.application.RuntimeApplicationException;
  import com.lts.application.SimpleExceptionHandler;
  import com.lts.caloriecount.app.CalorieCount;
  import com.lts.event.Callback;
  import com.lts.io.ImprovedFile;
  import com.lts.pest.Pest;
  import java.awt.Component;
  import java.awt.HeadlessException;
  import java.awt.RenderingHints;
  import java.awt.event.ActionListener;
  import java.io.File;
  import java.io.IOException;
  import java.util.Comparator;
  import java.util.List;
  import java.util.Properties;
  import java.util.Set;
  import java.util.TreeSet;
  import java.util.Vector;
  import java.util.concurrent.ExecutorService;
  import java.util.concurrent.Executors;
  import java.util.concurrent.Future;
  import java.util.concurrent.TimeUnit;
  import javax.swing.text.DefaultEditorKit;
  import org.evosuite.Properties.SandboxMode;
  import org.evosuite.runtime.System;
  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 ApplicationEvoSuiteTest {
  
    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  {
      Future<?> future = executor.submit(new Runnable(){ 
              public void run() { 
          try {
            CalorieCount calorieCount0 = new CalorieCount();
            String[] stringArray0 = new String[10];
            stringArray0[0] = "n";
            stringArray0[1] = "";
            stringArray0[2] = "U^";
            stringArray0[3] = "Failed to create stack trace";
            stringArray0[4] = "";
            stringArray0[5] = "";
            stringArray0[6] = "Error creating temp directory ";
            stringArray0[7] = "7s'`[wDr]NG";
            stringArray0[8] = "s%";
            stringArray0[9] = "critical.question.saveFailedUnknown";
            // Undeclared exception!
            try {
              calorieCount0.initializeApplication(stringArray0);
              fail("Expecting exception: System.SystemExitException");
            } catch(System.SystemExitException e) {
            }
          } catch(Throwable t) {
              // Need to catch declared exceptions
          }
        } 
      }); 
      future.get(6000, TimeUnit.MILLISECONDS); 
    }
  
    @Test
    public void test1()  throws Throwable  {
        CalorieCount calorieCount0 = (CalorieCount)Pest.getApp();
        calorieCount0.resetApplication();
        assertEquals(false, calorieCount0.dataIsDirty());
    }
  
    @Test
    public void test2()  throws Throwable  {
        CalorieCount calorieCount0 = (CalorieCount)Application.getInstance();
        calorieCount0.removeRepositoryListener((RepositoryListener) null);
        assertEquals(false, calorieCount0.deleteTempFiles());
    }
  
    @Test
    public void test3()  throws Throwable  {
        CalorieCount calorieCount0 = (CalorieCount)Pest.getApp();
        RepositoryListenerAdapter repositoryListenerAdapter0 = new RepositoryListenerAdapter();
        calorieCount0.addRepositoryListener((RepositoryListener) repositoryListenerAdapter0);
        System.setCurrentTimeMillis(276L);
        CalorieCount calorieCount1 = (CalorieCount)Pest.getApp();
        DefaultEditorKit.CopyAction defaultEditorKit_CopyAction0 = new DefaultEditorKit.CopyAction();
        calorieCount1.wrapListener((ActionListener) defaultEditorKit_CopyAction0);
        calorieCount1.findFile("?FXE!A");
        Suspender suspender0 = new Suspender();
        System.setCurrentTimeMillis(0L);
        Suspender suspender1 = new Suspender((Callback) suspender0);
        calorieCount1.addShutdownCallback((Callback) suspender1);
        assertEquals(false, calorieCount1.dataIsDirty());
    }
  
    @Test
    public void test4()  throws Throwable  {
        CalorieCount calorieCount0 = (CalorieCount)Pest.getApp();
        // Undeclared exception!
        try {
          calorieCount0.getMessage("Y6&J");
          fail("Expecting exception: NullPointerException");
        } catch(NullPointerException e) {
        }
    }
  
    @Test
    public void test5()  throws Throwable  {
      Future<?> future = executor.submit(new Runnable(){ 
              public void run() { 
            CalorieCount calorieCount0 = new CalorieCount();
            // Undeclared exception!
            try {
              calorieCount0.browseSaveFile();
              fail("Expecting exception: SecurityException");
            } catch(SecurityException e) {
              /*
               * Security manager blocks (java.io.FilePermission /home/ac1gf 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.File.canWrite(File.java:711)
               * sun.awt.shell.ShellFolder.canWrite(ShellFolder.java:284)
               * sun.swing.FilePane.canWrite(FilePane.java:1817)
               * sun.swing.FilePane.doDirectoryChanged(FilePane.java:1470)
               * sun.swing.FilePane.propertyChange(FilePane.java:1516)
               * java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
               * java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
               * java.awt.Component.firePropertyChange(Component.java:8154)
               * javax.swing.JFileChooser.setCurrentDirectory(JFileChooser.java:568)
               * javax.swing.JFileChooser.<init>(JFileChooser.java:334)
               * javax.swing.JFileChooser.<init>(JFileChooser.java:286)
               * com.lts.application.Application.getFileChooser(Application.java:2505)
               * com.lts.application.Application.browseFiles(Application.java:2528)
               * com.lts.application.Application.browseSaveFile(Application.java:2662)
               * com.lts.application.Application.browseSaveFile(Application.java:2667)
               * sun.reflect.GeneratedMethodAccessor206.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)
               */
            }
        } 
      }); 
      future.get(6000, TimeUnit.MILLISECONDS); 
    }
  
    @Test
    public void test6()  throws Throwable  {
      Future<?> future = executor.submit(new Runnable(){ 
              public void run() { 
          try {
            CalorieCount calorieCount0 = (CalorieCount)Pest.getApp();
            assertNotNull(calorieCount0);
            
            // Undeclared exception!
            try {
              calorieCount0.resetRepository();
              fail("Expecting exception: SecurityException");
            } catch(SecurityException e) {
              /*
               * Security manager blocks (java.io.FilePermission /home/ac1gf 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.File.canWrite(File.java:711)
               * sun.awt.shell.ShellFolder.canWrite(ShellFolder.java:284)
               * sun.swing.FilePane.canWrite(FilePane.java:1817)
               * sun.swing.FilePane.doDirectoryChanged(FilePane.java:1470)
               * sun.swing.FilePane.propertyChange(FilePane.java:1516)
               * java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
               * java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
               * java.awt.Component.firePropertyChange(Component.java:8154)
               * javax.swing.JFileChooser.setCurrentDirectory(JFileChooser.java:568)
               * javax.swing.JFileChooser.<init>(JFileChooser.java:334)
               * javax.swing.JFileChooser.<init>(JFileChooser.java:286)
               * com.lts.application.Application.getFileChooser(Application.java:2505)
               * com.lts.application.Application.browseFiles(Application.java:2528)
               * com.lts.application.Application.browseOpenFile(Application.java:2573)
               * com.lts.application.Application.browseOpenFile(Application.java:2579)
               * com.lts.application.Application.resetRepository(Application.java:2883)
               * sun.reflect.GeneratedMethodAccessor207.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 test7()  throws Throwable  {
        CalorieCount calorieCount0 = new CalorieCount();
        Vector<String> vector0 = new Vector<String>();
        calorieCount0.setStandardDirectories((List) vector0);
        assertEquals("CalorieCount", calorieCount0.getTempFilePrefix());
        assertEquals(false, calorieCount0.deleteTempFiles());
        assertEquals("", calorieCount0.getTempFileSuffix());
    }
  
    @Test
    public void test8()  throws Throwable  {
        String string0 = Application.getAppProperty("");
        assertNull(string0);
    }
  
    @Test
    public void test9()  throws Throwable  {
        CalorieCount calorieCount0 = new CalorieCount();
        boolean boolean0 = calorieCount0.lafSetLookAndFeel("^P");
        assertEquals("", calorieCount0.getTempFileSuffix());
        assertEquals(false, boolean0);
        assertEquals("CalorieCount", calorieCount0.getTempFilePrefix());
        assertEquals(false, calorieCount0.deleteTempFiles());
    }
  
    @Test
    public void test10()  throws Throwable  {
      Future<?> future = executor.submit(new Runnable(){ 
              public void run() { 
            CalorieCount calorieCount0 = new CalorieCount();
            // Undeclared exception!
            try {
              calorieCount0.performImmediateShutdown();
              fail("Expecting exception: System.SystemExitException");
            } catch(System.SystemExitException e) {
            }
        } 
      }); 
      future.get(6000, TimeUnit.MILLISECONDS); 
    }
  
    @Test
    public void test11()  throws Throwable  {
      Future<?> future = executor.submit(new Runnable(){ 
              public void run() { 
          try {
            CalorieCount calorieCount0 = (CalorieCount)Pest.getApp();
            calorieCount0.askQuitSaveData();
            CalorieCount calorieCount1 = (CalorieCount)Pest.getApp();
            calorieCount0.notifyShutdownListeners();
            Properties properties0 = calorieCount1.loadPropertiesFile();
            calorieCount0.getDeleteFileCallback();
            Object[] objectArray0 = new Object[7];
            objectArray0[0] = (Object) calorieCount1;
            objectArray0[1] = (Object) properties0;
            calorieCount1.getFormatter();
            objectArray0[2] = (Object) calorieCount1;
            Object object0 = RenderingHints.VALUE_INTERPOLATION_BICUBIC;
            objectArray0[4] = object0;
            Object object1 = RenderingHints.VALUE_FRACTIONALMETRICS_ON;
            calorieCount0.unsavedChanges();
            RepositoryListenerAdapter repositoryListenerAdapter0 = new RepositoryListenerAdapter();
            calorieCount1.addRepositoryListener((RepositoryListener) repositoryListenerAdapter0);
            objectArray0[5] = object1;
            objectArray0[6] = (Object) "#,bw{L";
            calorieCount1.askQuitSaveData();
            calorieCount1.getDefaultMessage((String) null, "#,bw{L", objectArray0);
            Pest.getApp();
            // Undeclared exception!
            try {
              calorieCount0.createTempFile();
              fail("Expecting exception: SecurityException");
            } catch(SecurityException e) {
              /*
               * Security manager blocks (java.io.FilePermission /tmp/CalorieCount4316743366522437036 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.File.checkAndCreate(File.java:1696)
               * java.io.File.createTempFile(File.java:1792)
               * com.lts.application.Application.createTempFile(Application.java:907)
               * sun.reflect.GeneratedMethodAccessor226.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 test12()  throws Throwable  {
      Future<?> future = executor.submit(new Runnable(){ 
              public void run() { 
            CalorieCount calorieCount0 = new CalorieCount();
            // Undeclared exception!
            try {
              calorieCount0.createNew();
              fail("Expecting exception: SecurityException");
            } catch(SecurityException e) {
              /*
               * Security manager blocks (java.io.FilePermission /tmp/CalorieCount2278934347259709386 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.File.checkAndCreate(File.java:1696)
               * java.io.File.createTempFile(File.java:1792)
               * com.lts.application.Application.createTempFile(Application.java:907)
               * com.lts.caloriecount.app.CalorieCount.createRepository(CalorieCount.java:116)
               * com.lts.application.Application.defaultApplicationRepository(Application.java:2245)
               * com.lts.application.Application.createNew(Application.java:2911)
               * sun.reflect.GeneratedMethodAccessor227.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)
               */
            }
        } 
      }); 
      future.get(6000, TimeUnit.MILLISECONDS); 
    }
  
    @Test
    public void test13()  throws Throwable  {
        int int0 = Application.shortStrToArg("");
        assertEquals((-1), int0);
    }
  
    @Test
    public void test14()  throws Throwable  {
        Application.setAppProperty("", "");
    }
  
    @Test
    public void test15()  throws Throwable  {
        CalorieCount calorieCount0 = new CalorieCount();
        // Undeclared exception!
        try {
          calorieCount0.createTempDir();
          fail("Expecting exception: NullPointerException");
        } catch(NullPointerException e) {
        }
    }
  
    @Test
    public void test16()  throws Throwable  {
        CalorieCount calorieCount0 = new CalorieCount();
        String[] stringArray0 = new String[9];
        // Undeclared exception!
        try {
          calorieCount0.startApplication(stringArray0);
          fail("Expecting exception: System.SystemExitException");
        } catch(System.SystemExitException e) {
        }
    }
  
    @Test
    public void test17()  throws Throwable  {
      Future<?> future = executor.submit(new Runnable(){ 
              public void run() { 
            CalorieCount calorieCount0 = new CalorieCount();
            // Undeclared exception!
            try {
              calorieCount0.browseSaveFileOrDirectory();
              fail("Expecting exception: SecurityException");
            } catch(SecurityException e) {
              /*
               * Security manager blocks (java.io.FilePermission /home/ac1gf 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.File.canWrite(File.java:711)
               * sun.awt.shell.ShellFolder.canWrite(ShellFolder.java:284)
               * sun.swing.FilePane.canWrite(FilePane.java:1817)
               * sun.swing.FilePane.doDirectoryChanged(FilePane.java:1470)
               * sun.swing.FilePane.propertyChange(FilePane.java:1516)
               * java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
               * java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
               * java.awt.Component.firePropertyChange(Component.java:8154)
               * javax.swing.JFileChooser.setCurrentDirectory(JFileChooser.java:568)
               * javax.swing.JFileChooser.<init>(JFileChooser.java:334)
               * javax.swing.JFileChooser.<init>(JFileChooser.java:286)
               * com.lts.application.Application.getFileChooser(Application.java:2505)
               * com.lts.application.Application.browseFiles(Application.java:2528)
               * com.lts.application.Application.browseSaveFileOrDirectory(Application.java:2673)
               * com.lts.application.Application.browseSaveFileOrDirectory(Application.java:2678)
               * sun.reflect.GeneratedMethodAccessor231.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)
               */
            }
        } 
      }); 
      future.get(6000, TimeUnit.MILLISECONDS); 
    }
  
    @Test
    public void test18()  throws Throwable  {
        CalorieCount calorieCount0 = (CalorieCount)Pest.getApp();
        // Undeclared exception!
        try {
          calorieCount0.getDefaultMessage("_o<Z7p?>7qK7D!R", (String) null, "icon");
          fail("Expecting exception: StackOverflowError");
        } catch(StackOverflowError e) {
        }
    }
  
    @Test
    public void test19()  throws Throwable  {
        CalorieCount calorieCount0 = new CalorieCount();
        calorieCount0.getDeleteFileCallback();
        assertEquals("", calorieCount0.getTempFileSuffix());
        assertEquals(true, calorieCount0.keepTempFiles());
        assertEquals("CalorieCount", calorieCount0.getTempFilePrefix());
    }
  
    @Test
    public void test20()  throws Throwable  {
        CalorieCount calorieCount0 = new CalorieCount();
        calorieCount0.setTempFileSuffix("");
        assertEquals("CalorieCount", calorieCount0.getTempFilePrefix());
        assertEquals(true, calorieCount0.keepTempFiles());
        assertEquals("", calorieCount0.getTempFileSuffix());
    }
  
    @Test
    public void test21()  throws Throwable  {
      Future<?> future = executor.submit(new Runnable(){ 
              public void run() { 
          try {
            CalorieCount calorieCount0 = new CalorieCount();
            try {
              calorieCount0.cleanupRepositories();
              fail("Expecting exception: ApplicationTerminateException");
            } catch(ApplicationTerminateException e) {
            }
          } catch(Throwable t) {
              // Need to catch declared exceptions
          }
        } 
      }); 
      future.get(6000, TimeUnit.MILLISECONDS); 
    }
  
    @Test
    public void test22()  throws Throwable  {
        SimpleExceptionHandler simpleExceptionHandler0 = (SimpleExceptionHandler)Application.getExceptionHandler();
        Application.setExceptionHandler((ApplicationExceptionHandler) simpleExceptionHandler0);
    }
  
    @Test
    public void test23()  throws Throwable  {
        CalorieCount calorieCount0 = (CalorieCount)Pest.getApp();
        assertNotNull(calorieCount0);
        
        calorieCount0.setTempFilePrefix("Z{YIcf76g");
        assertEquals("Z{YIcf76g", calorieCount0.getTempFilePrefix());
    }
  
    @Test
    public void test24()  throws Throwable  {
      Future<?> future = executor.submit(new Runnable(){ 
              public void run() { 
            CalorieCount calorieCount0 = (CalorieCount)Pest.getApp();
            // Undeclared exception!
            try {
              calorieCount0.browseSaveDirectory();
              fail("Expecting exception: SecurityException");
            } catch(SecurityException e) {
              /*
               * Security manager blocks (java.io.FilePermission /home/ac1gf 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.File.canWrite(File.java:711)
               * sun.awt.shell.ShellFolder.canWrite(ShellFolder.java:284)
               * sun.swing.FilePane.canWrite(FilePane.java:1817)
               * sun.swing.FilePane.doDirectoryChanged(FilePane.java:1470)
               * sun.swing.FilePane.propertyChange(FilePane.java:1516)
               * java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
               * java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
               * java.awt.Component.firePropertyChange(Component.java:8154)
               * javax.swing.JFileChooser.setCurrentDirectory(JFileChooser.java:568)
               * javax.swing.JFileChooser.<init>(JFileChooser.java:334)
               * javax.swing.JFileChooser.<init>(JFileChooser.java:286)
               * com.lts.application.Application.getFileChooser(Application.java:2505)
               * com.lts.application.Application.browseFiles(Application.java:2528)
               * com.lts.application.Application.browseSaveDirectory(Application.java:2684)
               * com.lts.application.Application.browseSaveDirectory(Application.java:2689)
               * sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
               * sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
               * 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)
               */
            }
        } 
      }); 
      future.get(6000, TimeUnit.MILLISECONDS); 
    }
  
    @Test
    public void test25()  throws Throwable  {
      Future<?> future = executor.submit(new Runnable(){ 
              public void run() { 
            CalorieCount calorieCount0 = new CalorieCount();
            // Undeclared exception!
            try {
              calorieCount0.browseOpenDirectory((Component) null);
              fail("Expecting exception: SecurityException");
            } catch(SecurityException e) {
              /*
               * Security manager blocks (java.io.FilePermission /home/ac1gf 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.File.canWrite(File.java:711)
               * sun.awt.shell.ShellFolder.canWrite(ShellFolder.java:284)
               * sun.swing.FilePane.canWrite(FilePane.java:1817)
               * sun.swing.FilePane.doDirectoryChanged(FilePane.java:1470)
               * sun.swing.FilePane.propertyChange(FilePane.java:1516)
               * java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
               * java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
               * java.awt.Component.firePropertyChange(Component.java:8154)
               * javax.swing.JFileChooser.setCurrentDirectory(JFileChooser.java:568)
               * javax.swing.JFileChooser.<init>(JFileChooser.java:334)
               * javax.swing.JFileChooser.<init>(JFileChooser.java:286)
               * com.lts.application.Application.getFileChooser(Application.java:2505)
               * com.lts.application.Application.browseFiles(Application.java:2528)
               * com.lts.application.Application.browseOpenDirectory(Application.java:2596)
               * sun.reflect.GeneratedMethodAccessor235.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)
               */
            }
        } 
      }); 
      future.get(6000, TimeUnit.MILLISECONDS); 
    }
  
    @Test
    public void test26()  throws Throwable  {
        CalorieCount calorieCount0 = new CalorieCount();
        String string0 = calorieCount0.getSaveBeforeExitMessage();
        assertEquals(true, calorieCount0.keepTempFiles());
        assertEquals("Do you want to save your changes before existing?", string0);
        assertEquals("", calorieCount0.getTempFileSuffix());
        assertEquals("CalorieCount", calorieCount0.getTempFilePrefix());
    }
  
    @Test
    public void test27()  throws Throwable  {
        CalorieCount calorieCount0 = (CalorieCount)Pest.getApp();
        File file0 = calorieCount0.findFile("?FXE!A");
        assertNull(file0);
    }
  
    @Test
    public void test28()  throws Throwable  {
      Future<?> future = executor.submit(new Runnable(){ 
              public void run() { 
            CalorieCount calorieCount0 = (CalorieCount)Pest.getApp();
            // Undeclared exception!
            try {
              calorieCount0.shutDown(true);
              fail("Expecting exception: HeadlessException");
            } catch(HeadlessException e) {
            }
        } 
      }); 
      future.get(6000, TimeUnit.MILLISECONDS); 
    }
  
    @Test
    public void test29()  throws Throwable  {
        CalorieCount calorieCount0 = new CalorieCount();
        boolean boolean0 = calorieCount0.deleteTempFiles();
        assertEquals("", calorieCount0.getTempFileSuffix());
        assertEquals(false, boolean0);
        assertEquals("CalorieCount", calorieCount0.getTempFilePrefix());
    }
  
    @Test
    public void test30()  throws Throwable  {
        CalorieCount calorieCount0 = (CalorieCount)Pest.getApp();
        Application.setInstance((Application) calorieCount0);
        assertEquals("CalorieCount", calorieCount0.getApplicationName());
    }
  
    @Test
    public void test31()  throws Throwable  {
        CalorieCount calorieCount0 = (CalorieCount)Pest.getApp();
        calorieCount0.getCommandLineArguments();
    }
  
    @Test
    public void test32()  throws Throwable  {
        CalorieCount calorieCount0 = new CalorieCount();
        calorieCount0.setLastFile((File) null);
        assertEquals(true, calorieCount0.keepTempFiles());
        assertEquals("CalorieCount", calorieCount0.getTempFilePrefix());
        assertEquals("", calorieCount0.getTempFileSuffix());
    }
  
    @Test
    public void test33()  throws Throwable  {
        CalorieCount calorieCount0 = (CalorieCount)Pest.getApp();
        calorieCount0.initializeResourceBundles();
        assertEquals(false, calorieCount0.isQuestioning());
    }
  
    @Test
    public void test34()  throws Throwable  {
        CalorieCount calorieCount0 = (CalorieCount)Pest.getApp();
        assertNotNull(calorieCount0);
        
        calorieCount0.setShortPropertyFileName("");
        assertEquals("", calorieCount0.getShortPropertyFileName());
    }
  
    @Test
    public void test35()  throws Throwable  {
        String string0 = Application.intToArg(1);
        assertEquals("initializationFile", string0);
        assertNotNull(string0);
    }
  
    @Test
    public void test36()  throws Throwable  {
      Future<?> future = executor.submit(new Runnable(){ 
              public void run() { 
            CalorieCount calorieCount0 = (CalorieCount)Pest.getApp();
            // Undeclared exception!
            try {
              calorieCount0.browseOpenDirectory();
              fail("Expecting exception: SecurityException");
            } catch(SecurityException e) {
              /*
               * Security manager blocks (java.io.FilePermission /home/ac1gf 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.File.canWrite(File.java:711)
               * sun.awt.shell.ShellFolder.canWrite(ShellFolder.java:284)
               * sun.swing.FilePane.canWrite(FilePane.java:1817)
               * sun.swing.FilePane.doDirectoryChanged(FilePane.java:1470)
               * sun.swing.FilePane.propertyChange(FilePane.java:1516)
               * java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
               * java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
               * java.awt.Component.firePropertyChange(Component.java:8154)
               * javax.swing.JFileChooser.setCurrentDirectory(JFileChooser.java:568)
               * javax.swing.JFileChooser.<init>(JFileChooser.java:334)
               * javax.swing.JFileChooser.<init>(JFileChooser.java:286)
               * com.lts.application.Application.getFileChooser(Application.java:2505)
               * com.lts.application.Application.browseFiles(Application.java:2528)
               * com.lts.application.Application.browseOpenDirectory(Application.java:2601)
               * sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
               * sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
               * 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)
               */
            }
        } 
      }); 
      future.get(6000, TimeUnit.MILLISECONDS); 
    }
  
    @Test
    public void test37()  throws Throwable  {
        CalorieCount calorieCount0 = new CalorieCount();
        calorieCount0.processRepositoryArgument((String) null);
        assertEquals("CalorieCount", calorieCount0.getTempFilePrefix());
        assertEquals(true, calorieCount0.keepTempFiles());
        assertEquals("", calorieCount0.getTempFileSuffix());
    }
  
    @Test
    public void test38()  throws Throwable  {
        CalorieCount calorieCount0 = new CalorieCount();
        calorieCount0.getPropertyFile();
        assertEquals("CalorieCount", calorieCount0.getTempFilePrefix());
        assertEquals(false, calorieCount0.deleteTempFiles());
        assertEquals("", calorieCount0.getTempFileSuffix());
    }
  
    @Test
    public void test39()  throws Throwable  {
        String string0 = Application.codeToKey((-1481));
        assertNull(string0);
    }
  
    @Test
    public void test40()  throws Throwable  {
      Future<?> future = executor.submit(new Runnable(){ 
              public void run() { 
          try {
            System.setCurrentTimeMillis(0L);
            CalorieCount calorieCount0 = (CalorieCount)Application.getInstance();
            String[] stringArray0 = new String[2];
            stringArray0[0] = "b`QYiZ";
            stringArray0[1] = "?wC";
            calorieCount0.setCommandLineArguments(stringArray0);
            CalorieCount calorieCount1 = (CalorieCount)Pest.getApp();
            calorieCount1.dataIsDirty();
            calorieCount1.getSystemRepositories();
            TreeSet<Object> treeSet0 = new TreeSet<Object>();
            treeSet0.comparator();
            TreeSet<ImprovedFile> treeSet1 = new TreeSet<ImprovedFile>((Comparator<? super ImprovedFile>) null);
            calorieCount1.deleteTempFiles((Set<ImprovedFile>) treeSet1);
            calorieCount1.getLastDirectory();
            CalorieCount calorieCount2 = (CalorieCount)Pest.getApp();
            File file0 = calorieCount2.getDefaultPropertyFile();
            // Undeclared exception!
            try {
              calorieCount2.loadRepository(file0);
              fail("Expecting exception: SecurityException");
            } catch(SecurityException e) {
              /*
               * Security manager blocks (java.io.FilePermission repos 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.File.mkdir(File.java:1155)
               * java.io.File.mkdirs(File.java:1184)
               * com.lts.application.Application.getRepositoryDir(Application.java:2830)
               * com.lts.application.Application.createRepositoryTempDir(Application.java:2845)
               * com.lts.application.Application.openRepository(Application.java:2851)
               * com.lts.application.Application.loadRepository(Application.java:2274)
               * sun.reflect.GeneratedMethodAccessor279.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 test41()  throws Throwable  {
        CalorieCount calorieCount0 = (CalorieCount)Application.getInstance();
        assertNotNull(calorieCount0);
        
        CalorieCount calorieCount1 = new CalorieCount();
        ImprovedFile improvedFile0 = calorieCount1.getCheckPointDirectory();
        calorieCount0.deleteOnShutdown((File) improvedFile0);
        assertEquals("CalorieCount", calorieCount1.getTempFilePrefix());
        assertEquals("app", calorieCount0.getTempFilePrefix());
    }
  
    @Test
    public void test42()  throws Throwable  {
        CalorieCount calorieCount0 = (CalorieCount)Pest.getApp();
        Suspender suspender0 = new Suspender((Callback) null);
        calorieCount0.removeShutdownCallback((Callback) suspender0);
        assertEquals(false, calorieCount0.getAlwaysOnTop());
    }
  
    @Test
    public void test43()  throws Throwable  {
        CalorieCount calorieCount0 = new CalorieCount();
        calorieCount0.initDeleteOnShutdown();
        File file0 = calorieCount0.getDefaultPropertyFile();
        assertNotNull(file0);
        
        calorieCount0.doNotDeleteOnShutdown(file0);
        assertEquals("CalorieCount", calorieCount0.getTempFilePrefix());
        assertEquals(true, calorieCount0.keepTempFiles());
        assertEquals("", calorieCount0.getTempFileSuffix());
        assertEquals("/home/ac1gf/caloriecount.txt", file0.getCanonicalPath());
        assertEquals("caloriecount.txt", calorieCount0.getShortPropertyFileName());
    }
  
    @Test
    public void test44()  throws Throwable  {
        CalorieCount calorieCount0 = new CalorieCount();
        Object[] objectArray0 = new Object[10];
        String string0 = calorieCount0.getLookupFailureMessage("q~RqAfi(~11i9\"", objectArray0);
        assertEquals("Lookup failed for key = q~RqAfi(~11i9\" and null, null, null, null, null, null, null, null, null, null", string0);
        assertEquals("CalorieCount", calorieCount0.getTempFilePrefix());
        assertEquals(true, calorieCount0.keepTempFiles());
        assertEquals("", calorieCount0.getTempFileSuffix());
        assertNotNull(string0);
    }
  
    @Test
    public void test45()  throws Throwable  {
        CalorieCount calorieCount0 = (CalorieCount)Pest.getApp();
        calorieCount0.removeTempFiles();
        assertEquals("CalorieCount", calorieCount0.getTempFilePrefix());
    }
  
    @Test
    public void test46()  throws Throwable  {
        CalorieCount calorieCount0 = (CalorieCount)Pest.getApp();
        assertNotNull(calorieCount0);
        
        boolean boolean0 = calorieCount0.saveData();
        assertEquals(true, boolean0);
    }
  
    @Test
    public void test47()  throws Throwable  {
        CalorieCount calorieCount0 = new CalorieCount();
        calorieCount0.saveDataAs((File) null);
        assertEquals("CalorieCount", calorieCount0.getTempFilePrefix());
        assertEquals(true, calorieCount0.keepTempFiles());
        assertEquals("", calorieCount0.getTempFileSuffix());
    }
  
    @Test
    public void test48()  throws Throwable  {
        CalorieCount calorieCount0 = new CalorieCount();
        File file0 = calorieCount0.findPropertiesFile();
        assertNotNull(file0);
        
        String[] stringArray0 = new String[5];
        stringArray0[0] = "L>sWXb-F)vm";
        stringArray0[1] = "Ee8A";
        stringArray0[2] = "@yH/tK";
        stringArray0[3] = "Ee8A";
        stringArray0[4] = "/org/jdesktop/swingx/color/colorwell.png";
        File file1 = calorieCount0.findFile(file0, stringArray0);
        assertNull(file1);
        assertEquals("CalorieCount", calorieCount0.getTempFilePrefix());
    }
  
    @Test
    public void test49()  throws Throwable  {
        CalorieCount calorieCount0 = new CalorieCount();
        File file0 = calorieCount0.findFile("");
        assertEquals("CalorieCount", calorieCount0.getTempFilePrefix());
        assertNotNull(file0);
        assertEquals("", calorieCount0.getTempFileSuffix());
        assertEquals("/mnt/fastdata/ac1gf/SF110/dist/78_caloriecount", file0.getPath());
        assertEquals(true, calorieCount0.keepTempFiles());
    }
  
    @Test
    public void test50()  throws Throwable  {
      Future<?> future = executor.submit(new Runnable(){ 
              public void run() { 
          try {
            CalorieCount calorieCount0 = (CalorieCount)Pest.getApp();
            assertNotNull(calorieCount0);
            
            // Undeclared exception!
            try {
              calorieCount0.loadRepository();
              fail("Expecting exception: SecurityException");
            } catch(SecurityException e) {
              /*
               * Security manager blocks (java.io.FilePermission /tmp/CalorieCount6471143334953042549 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.File.checkAndCreate(File.java:1696)
               * java.io.File.createTempFile(File.java:1792)
               * com.lts.application.Application.createTempFile(Application.java:907)
               * com.lts.caloriecount.app.CalorieCount.createRepository(CalorieCount.java:116)
               * com.lts.application.Application.defaultApplicationRepository(Application.java:2245)
               * com.lts.application.Application.loadRepository(Application.java:2220)
               * sun.reflect.GeneratedMethodAccessor289.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 test51()  throws Throwable  {
        CalorieCount calorieCount0 = new CalorieCount();
        boolean boolean0 = calorieCount0.loadRepository((File) null);
        assertEquals(false, boolean0);
        assertEquals("CalorieCount", calorieCount0.getTempFilePrefix());
        assertEquals("", calorieCount0.getTempFileSuffix());
        assertEquals(true, calorieCount0.keepTempFiles());
    }
  
    @Test
    public void test52()  throws Throwable  {
        CalorieCount calorieCount0 = new CalorieCount();
        // Undeclared exception!
        try {
          calorieCount0.browseOpenRepository();
          fail("Expecting exception: NullPointerException");
        } catch(NullPointerException e) {
        }
    }
  }
  