/*
 * This file was automatically generated by EvoSuite
 * Sun Jul 02 14:04:12 GMT 2017
 */

package com.github.cseppento.gradle.evosuite.testprojects.simple;

import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import com.github.cseppento.gradle.evosuite.testprojects.simple.SimpleApp;
import java.io.ByteArrayInputStream;
import java.io.PipedInputStream;
import java.io.PipedOutputStream;
import java.io.PrintStream;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.evosuite.runtime.mock.java.io.MockFile;
import org.evosuite.runtime.mock.java.io.MockPrintStream;
import org.junit.runner.RunWith;

@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true) 
public class SimpleApp_ESTest extends SimpleApp_ESTest_scaffolding {

  @Test(timeout = 4000)
  public void test0()  throws Throwable  {
      String[] stringArray0 = new String[4];
      SimpleApp.main(stringArray0);
      SimpleApp.main(stringArray0);
  }

  @Test(timeout = 4000)
  public void test1()  throws Throwable  {
      PipedOutputStream pipedOutputStream0 = new PipedOutputStream();
      assertNotNull(pipedOutputStream0);
      
      PipedInputStream pipedInputStream0 = new PipedInputStream(pipedOutputStream0, 1);
      assertEquals(0, pipedInputStream0.available());
      assertNotNull(pipedInputStream0);
      
      SimpleApp simpleApp0 = new SimpleApp(pipedInputStream0, (PrintStream) null);
      assertEquals(0, pipedInputStream0.available());
      assertNotNull(simpleApp0);
      
      // Undeclared exception!
      try { 
        simpleApp0.run();
        fail("Expecting exception: NullPointerException");
      
      } catch(NullPointerException e) {
         //
         // no message in exception (getMessage() returned null)
         //
         verifyException("com.github.cseppento.gradle.evosuite.testprojects.simple.SimpleApp", e);
      }
  }

  @Test(timeout = 4000)
  public void test2()  throws Throwable  {
      byte[] byteArray0 = new byte[3];
      ByteArrayInputStream byteArrayInputStream0 = new ByteArrayInputStream(byteArray0);
      MockFile mockFile0 = new MockFile("lVI;xb=j8H#R", "lVI;xb=j8H#R");
      MockPrintStream mockPrintStream0 = new MockPrintStream(mockFile0);
      SimpleApp simpleApp0 = new SimpleApp(byteArrayInputStream0, mockPrintStream0);
      simpleApp0.run();
      assertEquals(0, byteArrayInputStream0.available());
      assertEquals(411L, mockFile0.length());
  }
}

/*
 * This file was automatically generated by EvoSuite
 * Sun Jul 02 14:04:12 GMT 2017
 */

package com.github.cseppento.gradle.evosuite.testprojects.simple;

import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import com.github.cseppento.gradle.evosuite.testprojects.simple.SimpleApp;
import java.io.ByteArrayInputStream;
import java.io.PipedInputStream;
import java.io.PipedOutputStream;
import java.io.PrintStream;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.evosuite.runtime.mock.java.io.MockFile;
import org.evosuite.runtime.mock.java.io.MockPrintStream;
import org.junit.runner.RunWith;

@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true) 
public class SimpleApp_ESTest extends SimpleApp_ESTest_scaffolding {

  @Test(timeout = 4000)
  public void test0()  throws Throwable  {
      String[] stringArray0 = new String[4];
      SimpleApp.main(stringArray0);
      SimpleApp.main(stringArray0);
  }

  @Test(timeout = 4000)
  public void test1()  throws Throwable  {
      PipedOutputStream pipedOutputStream0 = new PipedOutputStream();
      assertNotNull(pipedOutputStream0);
      
      PipedInputStream pipedInputStream0 = new PipedInputStream(pipedOutputStream0, 1);
      assertEquals(0, pipedInputStream0.available());
      assertNotNull(pipedInputStream0);
      
      SimpleApp simpleApp0 = new SimpleApp(pipedInputStream0, (PrintStream) null);
      assertEquals(0, pipedInputStream0.available());
      assertNotNull(simpleApp0);
      
      // Undeclared exception!
      try { 
        simpleApp0.run();
        fail("Expecting exception: NullPointerException");
      
      } catch(NullPointerException e) {
         //
         // no message in exception (getMessage() returned null)
         //
         verifyException("com.github.cseppento.gradle.evosuite.testprojects.simple.SimpleApp", e);
      }
  }

  @Test(timeout = 4000)
  public void test2()  throws Throwable  {
      byte[] byteArray0 = new byte[3];
      ByteArrayInputStream byteArrayInputStream0 = new ByteArrayInputStream(byteArray0);
      MockFile mockFile0 = new MockFile("lVI;xb=j8H#R", "lVI;xb=j8H#R");
      MockPrintStream mockPrintStream0 = new MockPrintStream(mockFile0);
      SimpleApp simpleApp0 = new SimpleApp(byteArrayInputStream0, mockPrintStream0);
      simpleApp0.run();
      assertEquals(0, byteArrayInputStream0.available());
      // depends on OS EOL
      // assertEquals(411L, mockFile0.length());
  }
}

Remove OS-dependent assertion from pre-generated tests