content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Tue Mar 19 15:45:48 GMT 2024
   */
  
  package com.google.common.base;
  
  import org.junit.jupiter.api.Test;
  import static org.junit.jupiter.api.Assertions.*;
  import org.junit.jupiter.api.Timeout;
  import java.util.concurrent.TimeUnit;
  import static org.evosuite.runtime.EvoAssertions.*;
  import com.google.common.base.CharMatcher;
  import com.google.common.base.Splitter;
  import java.nio.ByteBuffer;
  import java.nio.CharBuffer;
  import java.util.List;
  import java.util.Map;
  import java.util.regex.Pattern;
  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 Splitter_Original_ESTest extends Splitter_Original_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSplitTakingCharSequenceAndOnTakingChar() throws Throwable  {
        Splitter on = Splitter.on('k');
        ByteBuffer allocateDirect = ByteBuffer.allocateDirect(0);
        CharBuffer arg0 = allocateDirect.asCharBuffer();
        Iterable<String> split = on.split(arg0);
        assertNotNull(split);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testOnTakingCharMatcher() throws Throwable  {
        CharMatcher arg0 = CharMatcher.JAVA_LOWER_CASE;
        Splitter on = Splitter.on(arg0);
        assertNotNull(on);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testOnTakingStringAndSplitToList() throws Throwable  {
        Splitter on = Splitter.on("$VALUES");
        List<String> splitToList = on.splitToList("8|s0$wWh/;`?Ha6'");
        assertTrue(splitToList.contains("8|s0$wWh/;`?Ha6'"));
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testTrimResultsTakingNoArguments() throws Throwable  {
        Splitter onPattern = Splitter.onPattern(" ");
        Splitter limit = onPattern.limit(1);
        Splitter trimResults = limit.trimResults();
        Splitter.MapSplitter withKeyValueSeparator = trimResults.withKeyValueSeparator('V');
        // Undeclared exception!
        try { 
          withKeyValueSeparator.split(" ");
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // Chunk [] is not a valid entry
           //
           verifyException("com.google.common.base.Preconditions", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testTrimResultsTakingCharMatcher() throws Throwable  {
        Splitter onPattern = Splitter.onPattern("WY$1VQiQj");
        CharMatcher arg0 = CharMatcher.JAVA_LETTER;
        Splitter trimResults = onPattern.trimResults(arg0);
        Splitter.MapSplitter withKeyValueSeparator = trimResults.withKeyValueSeparator("WY$1VQiQj");
        // Undeclared exception!
        try { 
          withKeyValueSeparator.split("WY$1VQiQj");
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // Chunk [$1] is not a valid entry
           //
           verifyException("com.google.common.base.Preconditions", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testOnPatternAndSplitToList() throws Throwable  {
        Splitter onPattern = Splitter.onPattern("|");
        List<String> splitToList = onPattern.splitToList("|");
        assertFalse(splitToList.contains("|"));
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLimitAndWithKeyValueSeparatorTakingChar() throws Throwable  {
        Splitter onPattern = Splitter.onPattern(" ");
        Splitter limit = onPattern.limit(1);
        Splitter.MapSplitter withKeyValueSeparator = limit.withKeyValueSeparator('V');
        // Undeclared exception!
        try { 
          withKeyValueSeparator.split(" ");
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // Chunk [ ] is not a valid entry
           //
           verifyException("com.google.common.base.Preconditions", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLimitThrowsIllegalArgumentException() throws Throwable  {
        Splitter fixedLength = Splitter.fixedLength(108);
        // Undeclared exception!
        try { 
          fixedLength.limit((-266));
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // must be greater than zero: -266
           //
           verifyException("com.google.common.base.Preconditions", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testOnTakingCharAndWithKeyValueSeparatorTakingSplitter() throws Throwable  {
        Splitter arg0 = Splitter.on('$');
        Splitter onPattern = Splitter.onPattern("}&ax*bdJt$yyh$Y]");
        Splitter.MapSplitter withKeyValueSeparator = onPattern.withKeyValueSeparator(arg0);
        // Undeclared exception!
        try { 
          withKeyValueSeparator.split("}&ax*bdJt$yyh$Y]");
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // Chunk [}&ax*bdJt$yyh$Y]] is not a valid entry
           //
           verifyException("com.google.common.base.Preconditions", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFixedLengthThrowsIllegalArgumentException() throws Throwable  {
        // Undeclared exception!
        try { 
          Splitter.fixedLength((-1717));
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // The length may not be less than 1
           //
           verifyException("com.google.common.base.Preconditions", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testOnTakingPatternThrowsIllegalArgumentException() throws Throwable  {
        Pattern arg0 = Pattern.compile("");
        // Undeclared exception!
        try { 
          Splitter.on(arg0);
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // The pattern may not match the empty string: 
           //
           verifyException("com.google.common.base.Preconditions", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testOnTakingPatternAndSplitTakingCharSequence() throws Throwable  {
        Pattern arg0 = Pattern.compile(", ");
        Splitter on = Splitter.on(arg0);
        Splitter omitEmptyStrings = on.omitEmptyStrings();
        Splitter.MapSplitter withKeyValueSeparator = omitEmptyStrings.withKeyValueSeparator("v@f1o}!bZ[F4.|`");
        Map<String, String> split = withKeyValueSeparator.split("");
        assertTrue(split.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testOnTakingStringThrowsIllegalArgumentException() throws Throwable  {
        // Undeclared exception!
        try { 
          Splitter.on("");
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // The separator may not be the empty string.
           //
           verifyException("com.google.common.base.Preconditions", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testOmitEmptyStrings() throws Throwable  {
        Splitter on = Splitter.on('$');
        Splitter omitEmptyStrings = on.omitEmptyStrings();
        List<String> splitToList = omitEmptyStrings.splitToList("}&ax*bdJ$yyh($Y]p");
        assertEquals(3, splitToList.size());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFixedLength() throws Throwable  {
        Splitter arg0 = Splitter.fixedLength(29);
        Splitter.MapSplitter withKeyValueSeparator = arg0.withKeyValueSeparator(arg0);
        // Undeclared exception!
        try { 
          withKeyValueSeparator.split("The length may not be less than 1");
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // Chunk [The length may not be less th] is not a valid entry
           //
           verifyException("com.google.common.base.Preconditions", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSplitTakingCharSequenceAndOnTakingString() throws Throwable  {
        Splitter on = Splitter.on(", ");
        Splitter.MapSplitter withKeyValueSeparator = on.withKeyValueSeparator(", ");
        // Undeclared exception!
        try { 
          withKeyValueSeparator.split(", ");
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // Chunk [] is not a valid entry
           //
           verifyException("com.google.common.base.Preconditions", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSplitTakingCharSequenceAndOnPattern() throws Throwable  {
        Splitter onPattern = Splitter.onPattern("|f`7Hh@`Uh#D");
        Splitter.MapSplitter withKeyValueSeparator = onPattern.withKeyValueSeparator("|f`7Hh@`Uh#D");
        // Undeclared exception!
        try { 
          withKeyValueSeparator.split("|f`7Hh@`Uh#D");
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // Chunk [|] is not a valid entry
           //
           verifyException("com.google.common.base.Preconditions", e);
        }
    }
  }
  