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

package org.apache.commons.io;

import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import org.apache.commons.io.ByteOrderMark;
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 ByteOrderMark_ESTest extends ByteOrderMark_ESTest_scaffolding {

  @Test(timeout = 4000)
  public void test00()  throws Throwable  {
      int[] intArray0 = new int[2];
      ByteOrderMark byteOrderMark0 = new ByteOrderMark("o*?gVp+g$p\u0007", intArray0);
      String string0 = byteOrderMark0.UTF_16LE.toString();
      assertEquals("ByteOrderMark[UTF-16LE: 0xFF,0xFE]", string0);
  }

  @Test(timeout = 4000)
  public void test01()  throws Throwable  {
      ByteOrderMark byteOrderMark0 = ByteOrderMark.UTF_16LE;
      byteOrderMark0.hashCode();
  }

  @Test(timeout = 4000)
  public void test02()  throws Throwable  {
      ByteOrderMark byteOrderMark0 = ByteOrderMark.UTF_16LE;
      ByteOrderMark byteOrderMark1 = ByteOrderMark.UTF_16BE;
      boolean boolean0 = byteOrderMark0.equals(byteOrderMark1);
      assertFalse(boolean0);
      assertFalse(byteOrderMark1.equals((Object)byteOrderMark0));
  }

  @Test(timeout = 4000)
  public void test03()  throws Throwable  {
      ByteOrderMark byteOrderMark0 = ByteOrderMark.UTF_32LE;
      ByteOrderMark byteOrderMark1 = ByteOrderMark.UTF_16BE;
      boolean boolean0 = byteOrderMark0.equals(byteOrderMark1);
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test04()  throws Throwable  {
      ByteOrderMark byteOrderMark0 = ByteOrderMark.UTF_16LE;
      boolean boolean0 = byteOrderMark0.equals("ByteOrderMark[UTF-16LE: 0xFF,0xFE]");
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test05()  throws Throwable  {
      ByteOrderMark byteOrderMark0 = ByteOrderMark.UTF_16LE;
      boolean boolean0 = byteOrderMark0.equals(byteOrderMark0);
      assertTrue(boolean0);
  }

  @Test(timeout = 4000)
  public void test06()  throws Throwable  {
      ByteOrderMark byteOrderMark0 = ByteOrderMark.UTF_32BE;
      byte[] byteArray0 = byteOrderMark0.getBytes();
      assertArrayEquals(new byte[] {(byte)0, (byte)0, (byte) (-2), (byte) (-1)}, byteArray0);
  }

  @Test(timeout = 4000)
  public void test07()  throws Throwable  {
      int[] intArray0 = new int[0];
      ByteOrderMark byteOrderMark0 = null;
      try {
        byteOrderMark0 = new ByteOrderMark("vBIV`hS;E@<D-1O2R)}", intArray0);
        fail("Expecting exception: IllegalArgumentException");
      
      } catch(IllegalArgumentException e) {
         //
         // No bytes specified
         //
         verifyException("org.apache.commons.io.ByteOrderMark", e);
      }
  }

  @Test(timeout = 4000)
  public void test08()  throws Throwable  {
      ByteOrderMark byteOrderMark0 = null;
      try {
        byteOrderMark0 = new ByteOrderMark("^z8X(=?tR", (int[]) null);
        fail("Expecting exception: IllegalArgumentException");
      
      } catch(IllegalArgumentException e) {
         //
         // No bytes specified
         //
         verifyException("org.apache.commons.io.ByteOrderMark", e);
      }
  }

  @Test(timeout = 4000)
  public void test09()  throws Throwable  {
      int[] intArray0 = new int[5];
      ByteOrderMark byteOrderMark0 = null;
      try {
        byteOrderMark0 = new ByteOrderMark("", intArray0);
        fail("Expecting exception: IllegalArgumentException");
      
      } catch(IllegalArgumentException e) {
         //
         // No charsetName specified
         //
         verifyException("org.apache.commons.io.ByteOrderMark", e);
      }
  }

  @Test(timeout = 4000)
  public void test10()  throws Throwable  {
      int[] intArray0 = new int[2];
      ByteOrderMark byteOrderMark0 = null;
      try {
        byteOrderMark0 = new ByteOrderMark((String) null, intArray0);
        fail("Expecting exception: IllegalArgumentException");
      
      } catch(IllegalArgumentException e) {
         //
         // No charsetName specified
         //
         verifyException("org.apache.commons.io.ByteOrderMark", e);
      }
  }

  @Test(timeout = 4000)
  public void test11()  throws Throwable  {
      ByteOrderMark byteOrderMark0 = ByteOrderMark.UTF_16LE;
      String string0 = byteOrderMark0.getCharsetName();
      assertEquals("UTF-16LE", string0);
  }
}
