/*
 * This file was automatically generated by EvoSuite
 * Thu Jan 21 19:13:47 GMT 2021
 */

package org.apache.commons.io;

import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.io.IOCase;
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 FilenameUtils_ESTest extends FilenameUtils_ESTest_scaffolding {

  @Test(timeout = 4000)
  public void test00()  throws Throwable  {
      String string0 = FilenameUtils.separatorsToUnix("SS/aK@lb");
      assertEquals("SS/aK@lb", string0);
  }

  @Test(timeout = 4000)
  public void test01()  throws Throwable  {
      boolean boolean0 = FilenameUtils.isExtension("", "=T3a<yFnJ)wrz");
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test02()  throws Throwable  {
      boolean boolean0 = FilenameUtils.wildcardMatch(",**fFr^C", ",**fFr^C");
      assertTrue(boolean0);
  }

  @Test(timeout = 4000)
  public void test03()  throws Throwable  {
      boolean boolean0 = FilenameUtils.wildcardMatchOnSystem("m*]4", "m*]4");
      assertTrue(boolean0);
  }

  @Test(timeout = 4000)
  public void test04()  throws Throwable  {
      boolean boolean0 = FilenameUtils.wildcardMatchOnSystem("^~oc By(rcA-H[?9", "*");
      assertTrue(boolean0);
  }

  @Test(timeout = 4000)
  public void test05()  throws Throwable  {
      IOCase iOCase0 = IOCase.SYSTEM;
      boolean boolean0 = FilenameUtils.wildcardMatch("SENSITIVE", "*50eKV2/4", iOCase0);
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test06()  throws Throwable  {
      IOCase iOCase0 = IOCase.INSENSITIVE;
      boolean boolean0 = FilenameUtils.wildcardMatch("", "?", iOCase0);
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test07()  throws Throwable  {
      boolean boolean0 = FilenameUtils.wildcardMatch("i", ".", (IOCase) null);
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test08()  throws Throwable  {
      boolean boolean0 = FilenameUtils.wildcardMatchOnSystem("", (String) null);
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test09()  throws Throwable  {
      IOCase iOCase0 = IOCase.SENSITIVE;
      boolean boolean0 = FilenameUtils.wildcardMatch((String) null, "", iOCase0);
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test10()  throws Throwable  {
      IOCase iOCase0 = IOCase.SYSTEM;
      boolean boolean0 = FilenameUtils.wildcardMatch((String) null, (String) null, iOCase0);
      assertTrue(boolean0);
  }

  @Test(timeout = 4000)
  public void test11()  throws Throwable  {
      LinkedList<String> linkedList0 = new LinkedList<String>();
      linkedList0.add("");
      boolean boolean0 = FilenameUtils.isExtension("SENSITIVE", (Collection<String>) linkedList0);
      assertTrue(boolean0);
  }

  @Test(timeout = 4000)
  public void test12()  throws Throwable  {
      LinkedList<String> linkedList0 = new LinkedList<String>();
      boolean boolean0 = FilenameUtils.isExtension(".", (Collection<String>) linkedList0);
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test13()  throws Throwable  {
      boolean boolean0 = FilenameUtils.isExtension("WPwKP", (Collection<String>) null);
      assertTrue(boolean0);
  }

  @Test(timeout = 4000)
  public void test14()  throws Throwable  {
      LinkedList<String> linkedList0 = new LinkedList<String>();
      boolean boolean0 = FilenameUtils.isExtension((String) null, (Collection<String>) linkedList0);
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test15()  throws Throwable  {
      String[] stringArray0 = new String[2];
      stringArray0[0] = "";
      boolean boolean0 = FilenameUtils.isExtension("", stringArray0);
      assertTrue(boolean0);
  }

  @Test(timeout = 4000)
  public void test16()  throws Throwable  {
      boolean boolean0 = FilenameUtils.isExtension(".", (String[]) null);
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test17()  throws Throwable  {
      String[] stringArray0 = new String[0];
      boolean boolean0 = FilenameUtils.isExtension("~_&zJ^;zAb[Iu0qdB", stringArray0);
      assertTrue(boolean0);
  }

  @Test(timeout = 4000)
  public void test18()  throws Throwable  {
      String[] stringArray0 = new String[1];
      boolean boolean0 = FilenameUtils.isExtension("=T3a<yFnJ)wrz", stringArray0);
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test19()  throws Throwable  {
      String[] stringArray0 = new String[9];
      boolean boolean0 = FilenameUtils.isExtension((String) null, stringArray0);
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test20()  throws Throwable  {
      boolean boolean0 = FilenameUtils.isExtension("mj!@*7^}XaVRZ6/&.", (String) null);
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test21()  throws Throwable  {
      boolean boolean0 = FilenameUtils.isExtension("", "");
      assertTrue(boolean0);
  }

  @Test(timeout = 4000)
  public void test22()  throws Throwable  {
      boolean boolean0 = FilenameUtils.isExtension((String) null, (String) null);
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test23()  throws Throwable  {
      boolean boolean0 = FilenameUtils.equals("3", "=tfaE/F", true, (IOCase) null);
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test24()  throws Throwable  {
      boolean boolean0 = FilenameUtils.equalsNormalized((String) null, (String) null);
      assertTrue(boolean0);
  }

  @Test(timeout = 4000)
  public void test25()  throws Throwable  {
      IOCase iOCase0 = IOCase.SYSTEM;
      boolean boolean0 = FilenameUtils.equals("7^}XaVRZ6/", (String) null, false, iOCase0);
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test26()  throws Throwable  {
      IOCase iOCase0 = IOCase.SYSTEM;
      boolean boolean0 = FilenameUtils.equals((String) null, "str2", false, iOCase0);
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test27()  throws Throwable  {
      String string0 = FilenameUtils.getBaseName("Null byte present in file/path name. There are no known legitimate use cases for such data, but several injection attacks may use it");
      assertEquals("path name", string0);
  }

  @Test(timeout = 4000)
  public void test28()  throws Throwable  {
      String string0 = FilenameUtils.removeExtension((String) null);
      assertNull(string0);
  }

  @Test(timeout = 4000)
  public void test29()  throws Throwable  {
      int int0 = FilenameUtils.indexOfExtension("?p/~kpv");
      assertEquals((-1), int0);
  }

  @Test(timeout = 4000)
  public void test30()  throws Throwable  {
      List<String> list0 = List.of("=T3a<yFnJ)wrz");
      boolean boolean0 = FilenameUtils.isExtension(")#j$!kW~*t<) =9#W", (Collection<String>) list0);
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test31()  throws Throwable  {
      String string0 = FilenameUtils.getExtension("Null byte present in file/path name. There are no known legitimate use cases for such data, but several injection attacks may use it");
      assertEquals(" There are no known legitimate use cases for such data, but several injection attacks may use it", string0);
      assertNotNull(string0);
  }

  @Test(timeout = 4000)
  public void test32()  throws Throwable  {
      String string0 = FilenameUtils.getExtension((String) null);
      assertNull(string0);
  }

  @Test(timeout = 4000)
  public void test33()  throws Throwable  {
      String string0 = FilenameUtils.getName((String) null);
      assertNull(string0);
  }

  @Test(timeout = 4000)
  public void test34()  throws Throwable  {
      String string0 = FilenameUtils.getFullPathNoEndSeparator("OOZR:@Xex=|a7PG");
      assertNotNull(string0);
      assertEquals("", string0);
  }

  @Test(timeout = 4000)
  public void test35()  throws Throwable  {
      String string0 = FilenameUtils.getFullPath("");
      assertEquals("", string0);
      assertNotNull(string0);
  }

  @Test(timeout = 4000)
  public void test36()  throws Throwable  {
      String string0 = FilenameUtils.getFullPathNoEndSeparator("");
      assertEquals("", string0);
      assertNotNull(string0);
  }

  @Test(timeout = 4000)
  public void test37()  throws Throwable  {
      String string0 = FilenameUtils.getFullPathNoEndSeparator(":");
      assertNull(string0);
  }

  @Test(timeout = 4000)
  public void test38()  throws Throwable  {
      String string0 = FilenameUtils.getFullPath((String) null);
      assertNull(string0);
  }

  @Test(timeout = 4000)
  public void test39()  throws Throwable  {
      String string0 = FilenameUtils.getPathNoEndSeparator("/oU]Rg`");
      assertNotNull(string0);
      assertEquals("", string0);
  }

  @Test(timeout = 4000)
  public void test40()  throws Throwable  {
      String string0 = FilenameUtils.getPathNoEndSeparator("xZ{Sn8d8VH$^4Jj/");
      assertNotNull(string0);
      assertEquals("xZ{Sn8d8VH$^4Jj", string0);
  }

  @Test(timeout = 4000)
  public void test41()  throws Throwable  {
      String string0 = FilenameUtils.getPath("lz] y)0%|M,Z*CE");
      assertEquals("", string0);
      assertNotNull(string0);
  }

  @Test(timeout = 4000)
  public void test42()  throws Throwable  {
      String string0 = FilenameUtils.getPrefix("~dv<&cLd|1>.1B");
      assertEquals("~dv<&cLd|1>.1B/", string0);
      assertNotNull(string0);
  }

  @Test(timeout = 4000)
  public void test43()  throws Throwable  {
      String string0 = FilenameUtils.getPrefix("::");
      assertNull(string0);
  }

  @Test(timeout = 4000)
  public void test44()  throws Throwable  {
      String string0 = FilenameUtils.getPrefix((String) null);
      assertNull(string0);
  }

  @Test(timeout = 4000)
  public void test45()  throws Throwable  {
      int int0 = FilenameUtils.indexOfExtension("\\Rdu.F3{$~");
      assertEquals(4, int0);
  }

  @Test(timeout = 4000)
  public void test46()  throws Throwable  {
      // Undeclared exception!
      try { 
        FilenameUtils.isExtension("Invalid IOCase name: ", ".");
        fail("Expecting exception: IllegalArgumentException");
      
      } catch(IllegalArgumentException e) {
         //
         // NTFS ADS separator (':') in file name is forbidden.
         //
         verifyException("org.apache.commons.io.FilenameUtils", e);
      }
  }

  @Test(timeout = 4000)
  public void test47()  throws Throwable  {
      int int0 = FilenameUtils.indexOfExtension((String) null);
      assertEquals((-1), int0);
  }

  @Test(timeout = 4000)
  public void test48()  throws Throwable  {
      int int0 = FilenameUtils.indexOfLastSeparator((String) null);
      assertEquals((-1), int0);
  }

  @Test(timeout = 4000)
  public void test49()  throws Throwable  {
      String string0 = FilenameUtils.normalizeNoEndSeparator("\\*T?{{");
      assertEquals("\\*T?{{", string0);
      assertNotNull(string0);
  }

  @Test(timeout = 4000)
  public void test50()  throws Throwable  {
      // Undeclared exception!
      try { 
        FilenameUtils.equalsNormalized("//B![^7/F3{D{", "//B![^7/F3{D{");
        fail("Expecting exception: NullPointerException");
      
      } catch(NullPointerException e) {
         //
         // Error normalizing one or both of the file names
         //
         verifyException("java.util.Objects", e);
      }
  }

  @Test(timeout = 4000)
  public void test51()  throws Throwable  {
      boolean boolean0 = FilenameUtils.equalsNormalizedOnSystem("/kXcu.-3{f*$to", "-pHP<)h]AV");
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test52()  throws Throwable  {
      IOCase iOCase0 = IOCase.SYSTEM;
      boolean boolean0 = FilenameUtils.equals("E:}. ", "~KxtOII#9{X)", true, iOCase0);
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test53()  throws Throwable  {
      String string0 = FilenameUtils.normalizeNoEndSeparator("p:");
      assertEquals("p:", string0);
      assertNotNull(string0);
  }

  @Test(timeout = 4000)
  public void test54()  throws Throwable  {
      String string0 = FilenameUtils.getPath("^:S[H");
      assertNull(string0);
  }

  @Test(timeout = 4000)
  public void test55()  throws Throwable  {
      boolean boolean0 = FilenameUtils.equalsNormalized("/:dD3/wF3{N{", "/:dD3/wF3{N{");
      assertTrue(boolean0);
  }

  @Test(timeout = 4000)
  public void test56()  throws Throwable  {
      String string0 = FilenameUtils.concat("~", "40vSfCCT%=mI;Wp");
      assertEquals("~\\40vSfCCT%=mI;Wp", string0);
      assertNotNull(string0);
  }

  @Test(timeout = 4000)
  public void test57()  throws Throwable  {
      boolean boolean0 = FilenameUtils.equalsNormalized("/", "/");
      assertTrue(boolean0);
  }

  @Test(timeout = 4000)
  public void test58()  throws Throwable  {
      int int0 = FilenameUtils.getPrefixLength("~");
      assertEquals(2, int0);
  }

  @Test(timeout = 4000)
  public void test59()  throws Throwable  {
      int int0 = FilenameUtils.getPrefixLength((String) null);
      assertEquals((-1), int0);
  }

  @Test(timeout = 4000)
  public void test60()  throws Throwable  {
      String string0 = FilenameUtils.separatorsToSystem((String) null);
      assertNull(string0);
  }

  @Test(timeout = 4000)
  public void test61()  throws Throwable  {
      String string0 = FilenameUtils.separatorsToSystem("/oU]Rg`");
      assertNotNull(string0);
      assertEquals("\\oU]Rg`", string0);
  }

  @Test(timeout = 4000)
  public void test62()  throws Throwable  {
      String string0 = FilenameUtils.separatorsToSystem("");
      assertNotNull(string0);
      assertEquals("", string0);
  }

  @Test(timeout = 4000)
  public void test63()  throws Throwable  {
      String string0 = FilenameUtils.separatorsToWindows((String) null);
      assertNull(string0);
  }

  @Test(timeout = 4000)
  public void test64()  throws Throwable  {
      String string0 = FilenameUtils.separatorsToUnix((String) null);
      assertNull(string0);
  }

  @Test(timeout = 4000)
  public void test65()  throws Throwable  {
      boolean boolean0 = FilenameUtils.directoryContains("aKjHm=D}U7G", "aKjHm=D}U7G");
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test66()  throws Throwable  {
      boolean boolean0 = FilenameUtils.directoryContains("str2", (String) null);
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test67()  throws Throwable  {
      // Undeclared exception!
      try { 
        FilenameUtils.directoryContains((String) null, "^(d{1,3}).(d{1,3}).(d{1,3}).(d{1,3})$");
        fail("Expecting exception: IllegalArgumentException");
      
      } catch(IllegalArgumentException e) {
         //
         // Directory must not be null
         //
         verifyException("org.apache.commons.io.FilenameUtils", e);
      }
  }

  @Test(timeout = 4000)
  public void test68()  throws Throwable  {
      boolean boolean0 = FilenameUtils.directoryContains("str2", "Sensitive");
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test69()  throws Throwable  {
      String string0 = FilenameUtils.concat("", "WLe+'MwoS8!8#Ua");
      assertEquals("WLe+'MwoS8!8#Ua", string0);
      assertNotNull(string0);
  }

  @Test(timeout = 4000)
  public void test70()  throws Throwable  {
      String string0 = FilenameUtils.concat((String) null, "");
      assertNull(string0);
  }

  @Test(timeout = 4000)
  public void test71()  throws Throwable  {
      String string0 = FilenameUtils.concat("", ":");
      assertNull(string0);
  }

  @Test(timeout = 4000)
  public void test72()  throws Throwable  {
      String string0 = FilenameUtils.concat(".HHG~$%]/", ".HHG~$%]/");
      assertEquals(".HHG~$%]\\.HHG~$%]\\", string0);
      assertNotNull(string0);
  }

  @Test(timeout = 4000)
  public void test73()  throws Throwable  {
      String string0 = FilenameUtils.normalizeNoEndSeparator(".");
      assertEquals("", string0);
  }

  @Test(timeout = 4000)
  public void test74()  throws Throwable  {
      String string0 = FilenameUtils.normalize("Ng fLd0j6b.", false);
      assertEquals("Ng fLd0j6b.", string0);
      assertNotNull(string0);
  }

  @Test(timeout = 4000)
  public void test75()  throws Throwable  {
      boolean boolean0 = FilenameUtils.equalsNormalized("/./F3{{", "/./F3{{");
      assertTrue(boolean0);
  }

  @Test(timeout = 4000)
  public void test76()  throws Throwable  {
      String string0 = FilenameUtils.normalize((String) null);
      assertNull(string0);
  }

  @Test(timeout = 4000)
  public void test77()  throws Throwable  {
      String string0 = FilenameUtils.normalizeNoEndSeparator("c:dW2v", true);
      assertEquals("c:dW2v", string0);
      assertNotNull(string0);
  }

  @Test(timeout = 4000)
  public void test78()  throws Throwable  {
      String string0 = FilenameUtils.normalizeNoEndSeparator("", false);
      assertNotNull(string0);
      assertEquals("", string0);
  }

  @Test(timeout = 4000)
  public void test79()  throws Throwable  {
      String string0 = FilenameUtils.normalize("SENSITIVE", true);
      assertEquals("SENSITIVE", string0);
      assertNotNull(string0);
  }

  @Test(timeout = 4000)
  public void test80()  throws Throwable  {
      boolean boolean0 = FilenameUtils.wildcardMatchOnSystem("?", "?");
      assertTrue(boolean0);
  }

  @Test(timeout = 4000)
  public void test81()  throws Throwable  {
      String string0 = FilenameUtils.getBaseName("");
      assertNotNull(string0);
      assertEquals("", string0);
  }

  @Test(timeout = 4000)
  public void test82()  throws Throwable  {
      FilenameUtils filenameUtils0 = new FilenameUtils();
      assertEquals('.', FilenameUtils.EXTENSION_SEPARATOR);
  }

  @Test(timeout = 4000)
  public void test83()  throws Throwable  {
      String string0 = FilenameUtils.concat("/Rdu./F3{$~", "/Rdu./F3{$~");
      assertEquals("\\Rdu.\\F3{$~", string0);
      assertNotNull(string0);
  }

  @Test(timeout = 4000)
  public void test84()  throws Throwable  {
      boolean boolean0 = FilenameUtils.equals(");>Z", "q[cnZ,>[v0%N");
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test85()  throws Throwable  {
      boolean boolean0 = FilenameUtils.wildcardMatch("org.apache.commons.io.IOCase", "?");
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test86()  throws Throwable  {
      String string0 = FilenameUtils.getPathNoEndSeparator("");
      assertEquals("", string0);
  }

  @Test(timeout = 4000)
  public void test87()  throws Throwable  {
      String string0 = FilenameUtils.getPath((String) null);
      assertNull(string0);
  }

  @Test(timeout = 4000)
  public void test88()  throws Throwable  {
      boolean boolean0 = FilenameUtils.equalsOnSystem("Z5yD", "");
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test89()  throws Throwable  {
      String string0 = FilenameUtils.getFullPath("/oU]Rg`");
      assertNotNull(string0);
      assertEquals("/", string0);
  }
}
