content: /*
   * This file was automatically generated by EvoSuite
   */
  
  package com.lts.util;
  
  import org.junit.Test;
  import org.junit.runner.RunWith;
  import org.evosuite.junit.EvoSuiteRunner;
  import static org.junit.Assert.*;
  import com.lts.util.MultiResourceBundle;
  import java.io.ByteArrayInputStream;
  import java.io.ByteArrayOutputStream;
  import java.io.File;
  import java.io.IOException;
  import java.io.InputStream;
  import java.io.OutputStream;
  import java.io.PrintWriter;
  import java.io.PushbackInputStream;
  import java.util.List;
  import java.util.Locale;
  import java.util.MissingResourceException;
  import java.util.PropertyResourceBundle;
  import java.util.ResourceBundle;
  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 MultiResourceBundleEvoSuiteTest {
  
    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() { 
            MultiResourceBundle multiResourceBundle0 = new MultiResourceBundle();
            // Undeclared exception!
            try {
              multiResourceBundle0.writeResourceList("Mgg=a|:");
              fail("Expecting exception: SecurityException");
            } catch(SecurityException e) {
              /*
               * Security manager blocks (java.io.FilePermission Mgg=a|: 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:84)
               * java.io.FileWriter.<init>(FileWriter.java:46)
               * com.lts.util.MultiResourceBundle.writeResourceList(MultiResourceBundle.java:229)
               * 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 test1()  throws Throwable  {
        MultiResourceBundle multiResourceBundle0 = new MultiResourceBundle();
        // Undeclared exception!
        try {
          multiResourceBundle0.getObject("/");
          fail("Expecting exception: NullPointerException");
        } catch(NullPointerException e) {
        }
    }
  
    @Test
    public void test2()  throws Throwable  {
        MultiResourceBundle multiResourceBundle0 = new MultiResourceBundle();
        char[] charArray0 = new char[4];
        multiResourceBundle0.printProperty((PrintWriter) null, charArray0);
    }
  
    @Test
    public void test3()  throws Throwable  {
      Future<?> future = executor.submit(new Runnable(){ 
              public void run() { 
            MultiResourceBundle multiResourceBundle0 = new MultiResourceBundle();
            File file0 = new File("PropertyFile", "PropertyFile");
            // Undeclared exception!
            try {
              multiResourceBundle0.writeResourceList(file0);
              fail("Expecting exception: SecurityException");
            } catch(SecurityException e) {
              /*
               * Security manager blocks (java.io.FilePermission PropertyFile/PropertyFile 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.util.MultiResourceBundle.writeResourceList(MultiResourceBundle.java:254)
               * 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 test4()  throws Throwable  {
      Future<?> future = executor.submit(new Runnable(){ 
              public void run() { 
          try {
            MultiResourceBundle multiResourceBundle0 = new MultiResourceBundle();
            // Undeclared exception!
            try {
              multiResourceBundle0.writeProperties("0$]2_At?D.Y");
              fail("Expecting exception: SecurityException");
            } catch(SecurityException e) {
              /*
               * Security manager blocks (java.io.FilePermission 0$]2_At?D.Y 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.MultiResourceBundle.writeProperties(MultiResourceBundle.java:321)
               * com.lts.util.MultiResourceBundle.writeProperties(MultiResourceBundle.java:309)
               * 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 test5()  throws Throwable  {
        MultiResourceBundle multiResourceBundle0 = new MultiResourceBundle();
        // Undeclared exception!
        try {
          multiResourceBundle0.addBundleClass("jv&,/ZNAOrCg");
          fail("Expecting exception: MissingResourceException");
        } catch(MissingResourceException e) {
          /*
           * Can't find bundle for base name jv&,/ZNAOrCg, locale it_IT
           */
        }
    }
  
    @Test
    public void test6()  throws Throwable  {
        MultiResourceBundle multiResourceBundle0 = new MultiResourceBundle();
        byte[] byteArray0 = new byte[3];
        ByteArrayInputStream byteArrayInputStream0 = new ByteArrayInputStream(byteArray0, 0, (int) (byte)99);
        PushbackInputStream pushbackInputStream0 = new PushbackInputStream((InputStream) byteArrayInputStream0);
        PropertyResourceBundle propertyResourceBundle0 = new PropertyResourceBundle((InputStream) pushbackInputStream0);
        multiResourceBundle0.addBundleInstance((ResourceBundle) propertyResourceBundle0);
    }
  
    @Test
    public void test7()  throws Throwable  {
        String string0 = MultiResourceBundle.toSlashClassName("0$]2_At?D.Y");
        assertNotNull(string0);
        assertEquals("0$]2_At?D/Y", string0);
    }
  
    @Test
    public void test8()  throws Throwable  {
        MultiResourceBundle multiResourceBundle0 = new MultiResourceBundle();
        List<String> list0 = ResourceBundle.Control.FORMAT_CLASS;
        // Undeclared exception!
        try {
          multiResourceBundle0.addAll(list0);
          fail("Expecting exception: MissingResourceException");
        } catch(MissingResourceException e) {
          /*
           * Can't find bundle for base name /java.class, locale it_IT
           */
        }
    }
  
    @Test
    public void test9()  throws Throwable  {
        MultiResourceBundle multiResourceBundle0 = new MultiResourceBundle();
        List<Object> list0 = multiResourceBundle0.getKeysAsList();
        multiResourceBundle0.addAll(list0);
        assertEquals(true, list0.isEmpty());
    }
  
    @Test
    public void test10()  throws Throwable  {
        MultiResourceBundle multiResourceBundle0 = new MultiResourceBundle();
        List<String> list0 = ResourceBundle.Control.FORMAT_CLASS;
        ResourceBundle.Control resourceBundle_Control0 = ResourceBundle.Control.getControl(list0);
        Locale locale0 = Locale.JAPANESE;
        List<Locale> list1 = resourceBundle_Control0.getCandidateLocales("", locale0);
        // Undeclared exception!
        try {
          multiResourceBundle0.addAll(list1);
          fail("Expecting exception: IllegalArgumentException");
        } catch(IllegalArgumentException e) {
        }
    }
  
    @Test
    public void test11()  throws Throwable  {
        MultiResourceBundle multiResourceBundle0 = new MultiResourceBundle();
        MultiResourceBundle.WriteMode multiResourceBundle_WriteMode0 = MultiResourceBundle.WriteMode.PropertyFile;
        multiResourceBundle0.writeResourceList((PrintWriter) null, multiResourceBundle_WriteMode0);
    }
  
    @Test
    public void test12()  throws Throwable  {
        MultiResourceBundle multiResourceBundle0 = new MultiResourceBundle();
        MultiResourceBundle.WriteMode multiResourceBundle_WriteMode0 = MultiResourceBundle.WriteMode.ContentDefine;
        // Undeclared exception!
        try {
          multiResourceBundle0.writeResourceList((PrintWriter) null, multiResourceBundle_WriteMode0);
          fail("Expecting exception: NullPointerException");
        } catch(NullPointerException e) {
        }
    }
  
    @Test
    public void test13()  throws Throwable  {
        MultiResourceBundle multiResourceBundle0 = new MultiResourceBundle();
        ByteArrayOutputStream byteArrayOutputStream0 = new ByteArrayOutputStream();
        PrintWriter printWriter0 = new PrintWriter((OutputStream) byteArrayOutputStream0);
        multiResourceBundle0.writeResourceList(printWriter0);
        assertEquals(40, byteArrayOutputStream0.size());
        assertEquals("static final Object[][] contents = {\n};\n", byteArrayOutputStream0.toString());
    }
  }
  