content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Wed Mar 20 10:22:25 GMT 2024
   */
  
  package JSci.maths.symbolic;
  
  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 JSci.maths.symbolic.SimpleCharStream;
  import java.io.InputStream;
  import java.io.PipedInputStream;
  import java.io.Reader;
  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 SimpleCharStream_ESTest extends SimpleCharStream_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testUpdateLineColumnThrowsNullPointerException() throws Throwable  {
        // No Comments were added
        // Undeclared exception!
        try { 
          SimpleCharStream.UpdateLineColumn('1');
          fail("Expecting exception: NullPointerException");
        
        } catch(NullPointerException e) {
           //
           // no message in exception (getMessage() returned null)
           //
           verifyException("JSci.maths.symbolic.SimpleCharStream", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFillBuffThrowsError() throws Throwable  {
        // rollbacked to evosuite
        // Undeclared exception!
        try { 
          SimpleCharStream.FillBuff();
          fail("Expecting exception: Error");
        
        } catch(Error e) {
           //
           // no message in exception (getMessage() returned null)
           //
           verifyException("JSci.maths.symbolic.SimpleCharStream", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesSimpleCharStreamTaking4Arguments() throws Throwable  {
        // rollbacked to evosuite
        SimpleCharStream simpleCharStream = new SimpleCharStream((Reader) null, (-3077), 1, 0);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetSuffix() throws Throwable  {
        // Given a PipedInputStream and a SimpleCharStream initialized with the PipedInputStream
        PipedInputStream pipedInputStream = new PipedInputStream();
        SimpleCharStream simpleCharStream = new SimpleCharStream(pipedInputStream);
        
        // When the GetSuffix method is called with an offset of 0
        char[] suffix = simpleCharStream.GetSuffix(0);
        
        // Then the length of the returned array should be 0, as there are no characters in the stream at this point
        assertEquals(0, suffix.length);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAdjustBeginLineColumn() throws Throwable  {
        // rollbacked to evosuite
        PipedInputStream arg0 = new PipedInputStream();
        SimpleCharStream simpleCharStream = new SimpleCharStream(arg0);
        SimpleCharStream.adjustBeginLineColumn(2172, 2499);
        SimpleCharStream.adjustBeginLineColumn(10, 2309);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testBackupWithNegative() throws Throwable  {
        // No Comments were added
        SimpleCharStream.backup((-17));
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReadCharThrowsNullPointerException0() throws Throwable  {
        // No Comments were added
        SimpleCharStream.inBuf = 1824;
        // Undeclared exception!
        try { 
          SimpleCharStream.readChar();
          fail("Expecting exception: NullPointerException");
        
        } catch(NullPointerException e) {
           //
           // no message in exception (getMessage() returned null)
           //
           verifyException("JSci.maths.symbolic.SimpleCharStream", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testBackupWithPositive() throws Throwable  {
        // No Comments were added
        SimpleCharStream.backup(1);
        // Undeclared exception!
        try { 
          SimpleCharStream.readChar();
          fail("Expecting exception: NullPointerException");
        
        } catch(NullPointerException e) {
           //
           // no message in exception (getMessage() returned null)
           //
           verifyException("JSci.maths.symbolic.SimpleCharStream", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReadCharThrowsNullPointerException1() throws Throwable  {
        // No Comments were added
        SimpleCharStream.tokenBegin = 3765;
        // Undeclared exception!
        try { 
          SimpleCharStream.readChar();
          fail("Expecting exception: NullPointerException");
        
        } catch(NullPointerException e) {
           //
           // no message in exception (getMessage() returned null)
           //
           verifyException("JSci.maths.symbolic.SimpleCharStream", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testExpandBuffThrowsError() throws Throwable  {
        // Undeclared exception!
        try {
        SimpleCharStream.ExpandBuff(true);
        fail("Expecting exception: Error");
        } catch (Error e) {
        // No message in the exception (getMessage() returned null)
        verifyException("JSci.maths.symbolic.SimpleCharStream", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesSimpleCharStreamTaking3ArgumentsAndCallsReInitTaking4Arguments() throws Throwable  {
        // Given: A SimpleCharStream object is created with a reader and a size of 1024 bytes
        SimpleCharStream simpleCharStream = new SimpleCharStream((Reader) null, (byte)7, 971);
        
        // When: The SimpleCharStream object is reinitialized with a new reader and size
        simpleCharStream.ReInit((Reader) null, (-1), (int) (byte)7, 4096);
        
        // Then: The begin column of the SimpleCharStream object should be set to 0
        assertEquals(0, simpleCharStream.getBeginColumn());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testBeginTokenThrowsNullPointerException() throws Throwable  {
        // Test that an exception is thrown when attempting to tokenize a null string
        try {
        SimpleCharStream.BeginToken();
        fail("Expecting exception: NullPointerException");
        
        } catch(NullPointerException e) {
        // Verify that the expected exception was thrown with no message
        verifyException("JSci.maths.symbolic.SimpleCharStream", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReInitTakingInputStream() throws Throwable  {
        // Create a new PipedInputStream object
        PipedInputStream pipedInputStream = new PipedInputStream();
        
        // Create a new SimpleCharStream object using the pipedInputStream as input
        SimpleCharStream simpleCharStream = new SimpleCharStream(pipedInputStream);
        
        // Re-initialize the SimpleCharStream with the same pipedInputStream object
        simpleCharStream.ReInit((InputStream) pipedInputStream);
        
        // Assert that the beginColumn of the SimpleCharStream is 0
        assertEquals(0, simpleCharStream.getBeginColumn());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesSimpleCharStreamTaking3ArgumentsAndCreatesSimpleCharStreamTaking3Arguments() throws Throwable  {
        // Create a new PipedInputStream object
        PipedInputStream arg0 = new PipedInputStream();
        
        // Create a new SimpleCharStream object with the PipedInputStream as input and 2048 buffer size
        SimpleCharStream simpleCharStream = new SimpleCharStream(arg0, 2048, 2048);
        
        // Assert that the beginning column is equal to 0 (i.e., the stream has not been read yet)
        assertEquals(0, simpleCharStream.getBeginColumn());
    }
  }
  