content: /*
   * This file was automatically generated by EvoSuite
   */
  
  package com.lts.application.bundles;
  
  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.application.bundles.BundleUtils;
  import com.lts.pest.tree.IdTreeNode;
  import java.io.ByteArrayInputStream;
  import java.io.File;
  import java.io.IOException;
  import java.io.InputStream;
  import java.io.PrintWriter;
  import java.util.Enumeration;
  import java.util.List;
  import java.util.Locale;
  import java.util.Map;
  import java.util.Properties;
  import java.util.PropertyResourceBundle;
  import java.util.ResourceBundle;
  import java.util.StringTokenizer;
  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 BundleUtilsEvoSuiteTest {
  
    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 {
            Class<?> class0 = BundleUtils.class;
            Properties properties0 = BundleUtils.getStaticStrings(class0);
            File file0 = new File("/thC2jH17af+K");
            // Undeclared exception!
            try {
              BundleUtils.writeUndefinedMessages(file0, (Class) class0, (Map) properties0);
              fail("Expecting exception: SecurityException");
            } catch(SecurityException e) {
              /*
               * Security manager blocks (java.io.FilePermission /thC2jH17af+K 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)
               * java.io.FileWriter.<init>(FileWriter.java:73)
               * com.lts.application.bundles.BundleUtils.writeUndefinedMessages(BundleUtils.java:311)
               * 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)
               */
            }
          } catch(Throwable t) {
              // Need to catch declared exceptions
          }
        } 
      }); 
      future.get(6000, TimeUnit.MILLISECONDS); 
    }
  
    @Test
    public void test1()  throws Throwable  {
        BundleUtils bundleUtils0 = new BundleUtils();
        assertNotNull(bundleUtils0);
    }
  
    @Test
    public void test2()  throws Throwable  {
        try {
          BundleUtils.loadBundle("e");
          fail("Expecting exception: LTSException");
        } catch(LTSException e) {
          /*
           * Could not find resource bundle, e
           */
        }
    }
  
    @Test
    public void test3()  throws Throwable  {
        File file0 = new File("nU");
        Class<?> class0 = Locale.class;
        // Undeclared exception!
        try {
          BundleUtils.writeUndefined(file0, (Class) class0, (ResourceBundle) null);
          fail("Expecting exception: NullPointerException");
        } catch(NullPointerException e) {
        }
    }
  
    @Test
    public void test4()  throws Throwable  {
        StringTokenizer stringTokenizer0 = new StringTokenizer("IzWx]ltyY.G:tvY:", "IzWx]ltyY.G:tvY:", true);
        List<Object> list0 = BundleUtils.toList((Enumeration) stringTokenizer0);
        assertEquals(false, stringTokenizer0.hasMoreElements());
        assertEquals(15, list0.size());
    }
  
    @Test
    public void test5()  throws Throwable  {
        Class<?> class0 = File.class;
        Properties properties0 = BundleUtils.getStaticStrings(class0);
        assertEquals("{pathSeparator=:, separator=/}", properties0.toString());
        assertNotNull(properties0);
    }
  
    @Test
    public void test6()  throws Throwable  {
        byte[] byteArray0 = new byte[9];
        ByteArrayInputStream byteArrayInputStream0 = new ByteArrayInputStream(byteArray0);
        PropertyResourceBundle propertyResourceBundle0 = new PropertyResourceBundle((InputStream) byteArrayInputStream0);
        Properties properties0 = BundleUtils.toProperties((ResourceBundle) propertyResourceBundle0);
        assertNotNull(properties0);
        
        Properties properties1 = BundleUtils.toProperties((Map) properties0);
        assertNotNull(properties1);
        assertEquals("{\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000=}", properties1.toString());
    }
  
    @Test
    public void test7()  throws Throwable  {
        Properties properties0 = new Properties();
        properties0.put((Object) "Japanese", (Object) "Japanese");
        Class<?> class0 = IdTreeNode.class;
        BundleUtils.printUndefinedMessages((PrintWriter) null, (Class) class0, (Map) properties0);
        assertEquals("{Japanese=Japanese}", properties0.toString());
    }
  
    @Test
    public void test8()  throws Throwable  {
        byte[] byteArray0 = new byte[9];
        ByteArrayInputStream byteArrayInputStream0 = new ByteArrayInputStream(byteArray0);
        PropertyResourceBundle propertyResourceBundle0 = new PropertyResourceBundle((InputStream) byteArrayInputStream0);
        Properties properties0 = BundleUtils.toProperties((ResourceBundle) propertyResourceBundle0);
        assertNotNull(properties0);
        
        Class<?> class0 = BundleUtils.class;
        // Undeclared exception!
        try {
          BundleUtils.printUndefinedMessages((PrintWriter) null, (Class) class0, (Map) properties0);
          fail("Expecting exception: NullPointerException");
        } catch(NullPointerException e) {
        }
    }
  
    @Test
    public void test9()  throws Throwable  {
        Properties properties0 = new Properties();
        properties0.put((Object) "Japanese", (Object) "");
        // Undeclared exception!
        try {
          BundleUtils.printMissing((PrintWriter) null, properties0, properties0);
          fail("Expecting exception: NullPointerException");
        } catch(NullPointerException e) {
        }
    }
  
    @Test
    public void test10()  throws Throwable  {
        Properties properties0 = new Properties();
        properties0.put((Object) "Japanese", (Object) "Japanese");
        BundleUtils.printMissing((PrintWriter) null, properties0, properties0);
        assertEquals(false, properties0.isEmpty());
    }
  
    @Test
    public void test11()  throws Throwable  {
        Properties properties0 = new Properties();
        properties0.put((Object) "Japanese", (Object) "Japanese");
        Properties properties1 = BundleUtils.invertKeysAndValues(properties0);
        assertNotSame(properties1, properties0);
        assertEquals("{Japanese=Japanese}", properties1.toString());
        assertNotNull(properties1);
    }
  }
  