@Test
  public void capturesStderrWhenProcessFailsDuringStart() throws Exception {
    // arrange
    givenStartedProcessWithStreamListeners(ProcessThrowsError.class);

    // act
    waitUntilProcessStops();

    // assert
    assertThatProcessAndReadersStoppedWithExitValue(1);
    assertThatStdOutContainsExactly(ProcessThrowsError.STDOUT);
    assertThatStdErrContains(ProcessThrowsError.ERROR_MSG);
  }
Integration tests that should be executed under both {@link ProcessStreamReader.ReadingMode}s.
geode-core/src/integrationTest/java/org/apache/geode/internal/process/BaseProcessStreamReaderIntegrationTest.java