/*
 * This file was automatically generated by EvoSuite
 * Thu Jan 21 18:36:04 GMT 2021
 */

package org.apache.commons.io;

import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import java.nio.charset.Charset;
import java.nio.charset.IllegalCharsetNameException;
import java.util.SortedMap;
import org.apache.commons.io.Charsets;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;

@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) 
public class Charsets_ESTest extends Charsets_ESTest_scaffolding {

  @Test(timeout = 4000)
  public void test0()  throws Throwable  {
      Charset charset0 = Charsets.toCharset((String) null);
      assertEquals("windows-1252", charset0.displayName());
  }

  @Test(timeout = 4000)
  public void test1()  throws Throwable  {
      // Undeclared exception!
      try { 
        Charsets.toCharset("]S5mR)-z)mlJ");
        fail("Expecting exception: IllegalCharsetNameException");
      
      } catch(IllegalCharsetNameException e) {
         //
         // ]S5mR)-z)mlJ
         //
         verifyException("java.nio.charset.Charset", e);
      }
  }

  @Test(timeout = 4000)
  public void test2()  throws Throwable  {
      Charset charset0 = Charsets.toCharset((Charset) null);
      Charset charset1 = Charsets.toCharset(charset0);
      assertSame(charset1, charset0);
  }

  @Test(timeout = 4000)
  public void test3()  throws Throwable  {
      Charsets charsets0 = new Charsets();
  }

  @Test(timeout = 4000)
  public void test4()  throws Throwable  {
      SortedMap<String, Charset> sortedMap0 = Charsets.requiredCharsets();
      assertEquals(6, sortedMap0.size());
  }
}
