@Test
public void testSubprocessReactorCrash() throws Exception {

	// One crash
	ProcessChannel<Serializable> processChannel =
		_localProcessExecutor.execute(
			_createJPDAProcessConfig(_JPDA_OPTIONS1),
			Operations.crashJVM(1));
	Future<Serializable> future =
		processChannel.getProcessNoticeableFuture();
	try {
		future.get();
		Assert.fail();
	}
	catch (ExecutionException executionException) {
		Throwable throwable = executionException.getCause();
		Assert.assertSame(
			TerminationProcessException.class, throwable.getClass());
		Assert.assertEquals(
			"Subprocess terminated with exit code 1",
			throwable.getMessage());
		TerminationProcessException terminationProcessException =
			(TerminationProcessException)throwable;
		Assert.assertEquals(1, terminationProcessException.getExitCode());
	}
	// Zero crash
	processChannel = _localProcessExecutor.execute(
		_createJPDAProcessConfig(_JPDA_OPTIONS1), Operations.crashJVM(0));
	future = processChannel.getProcessNoticeableFuture();
	try {
		future.get();
		Assert.fail();
	}
	catch (ExecutionException executionException) {
		Throwable throwable = executionException.getCause();
		Assert.assertSame(ProcessException.class, throwable.getClass());
		Assert.assertEquals(
			"Subprocess piping back ended prematurely",
			throwable.getMessage());
		throwable = throwable.getCause();
		Assert.assertSame(EOFException.class, throwable.getClass());
	}
}