content: /*
   * This file was automatically generated by EvoSuite
   */
  
  package com.lts.io;
  
  import org.junit.Test;
  import org.junit.runner.RunWith;
  import org.evosuite.junit.EvoSuiteRunner;
  import static org.junit.Assert.*;
  import com.lts.io.IOBufferOverflowException;
  import com.lts.io.SizeStringWriter;
  import java.io.IOException;
  import org.junit.BeforeClass;
  
  @RunWith(EvoSuiteRunner.class)
  public class SizeStringWriterEvoSuiteTest {
  
    @BeforeClass 
    public static void initEvoSuiteFramework(){ 
      org.evosuite.Properties.REPLACE_CALLS = true; 
    } 
  
  
    @Test
    public void test0()  throws Throwable  {
        SizeStringWriter sizeStringWriter0 = new SizeStringWriter();
        assertNotNull(sizeStringWriter0);
        
        long long0 = sizeStringWriter0.getMaxSize();
        assertEquals(0, sizeStringWriter0.getSize());
        assertEquals((-1L), long0);
    }
  
    @Test
    public void test1()  throws Throwable  {
        SizeStringWriter sizeStringWriter0 = new SizeStringWriter();
        assertNotNull(sizeStringWriter0);
        
        int int0 = sizeStringWriter0.getSize();
        assertEquals((-1L), sizeStringWriter0.getMaxSize());
        assertEquals(0, int0);
    }
  
    @Test
    public void test2()  throws Throwable  {
        SizeStringWriter sizeStringWriter0 = new SizeStringWriter(1, (-2027));
        assertNotNull(sizeStringWriter0);
        
        String string0 = sizeStringWriter0.toString();
        assertEquals((-2027L), sizeStringWriter0.getMaxSize());
        assertNotNull(string0);
        assertEquals(0, sizeStringWriter0.getSize());
    }
  
    @Test
    public void test3()  throws Throwable  {
        SizeStringWriter sizeStringWriter0 = new SizeStringWriter();
        assertNotNull(sizeStringWriter0);
        
        StringBuffer stringBuffer0 = sizeStringWriter0.getBuffer();
        assertEquals((-1L), sizeStringWriter0.getMaxSize());
        assertEquals(0, sizeStringWriter0.getSize());
        assertNotNull(stringBuffer0);
        assertEquals(128, stringBuffer0.capacity());
    }
  
    @Test
    public void test4()  throws Throwable  {
        SizeStringWriter sizeStringWriter0 = new SizeStringWriter(1, (-2027));
        assertNotNull(sizeStringWriter0);
        
        sizeStringWriter0.close();
        assertEquals((-2027L), sizeStringWriter0.getMaxSize());
        assertEquals(0, sizeStringWriter0.getSize());
    }
  
    @Test
    public void test5()  throws Throwable  {
        SizeStringWriter sizeStringWriter0 = new SizeStringWriter(0, 0);
        assertEquals(0L, sizeStringWriter0.getMaxSize());
        assertNotNull(sizeStringWriter0);
        
        sizeStringWriter0.initialize(1402);
        assertEquals((-1L), sizeStringWriter0.getMaxSize());
    }
  
    @Test
    public void test6()  throws Throwable  {
        SizeStringWriter sizeStringWriter0 = new SizeStringWriter(80);
        assertNotNull(sizeStringWriter0);
        
        sizeStringWriter0.flush();
        assertEquals((-1L), sizeStringWriter0.getMaxSize());
        assertEquals(0, sizeStringWriter0.getSize());
    }
  
    @Test
    public void test7()  throws Throwable  {
        SizeStringWriter sizeStringWriter0 = new SizeStringWriter();
        assertNotNull(sizeStringWriter0);
        
        char[] charArray0 = new char[10];
        // Undeclared exception!
        try {
          sizeStringWriter0.write(charArray0, (-1), (-515));
          fail("Expecting exception: IndexOutOfBoundsException");
        } catch(IndexOutOfBoundsException e) {
        }
    }
  
    @Test
    public void test8()  throws Throwable  {
        SizeStringWriter sizeStringWriter0 = new SizeStringWriter(1, (-2027));
        assertNotNull(sizeStringWriter0);
        
        try {
          sizeStringWriter0.write("<?@NO^?N^<<)90UU");
          fail("Expecting exception: IOBufferOverflowException");
        } catch(IOBufferOverflowException e) {
          /*
           * Operation would cause an overflow.  Current size: 0, write size: 16, maximum size: -2027, potential resulting size: 16
           */
        }
    }
  
    @Test
    public void test9()  throws Throwable  {
        SizeStringWriter sizeStringWriter0 = new SizeStringWriter(128, 128);
        assertNotNull(sizeStringWriter0);
        
        sizeStringWriter0.write("<?@NO^?N^<<)90UU");
        assertEquals(16, sizeStringWriter0.getSize());
    }
  }
  