@Test
public void testErrorExit() throws Exception {

	Future<?> future = ProcessUtil.execute(
		ConsumerOutputProcessor.INSTANCE, _buildArguments(ErrorExit.class));
	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 " + ErrorExit.EXIT_CODE,
			throwable.getMessage());
		TerminationProcessException terminationProcessException =
			(TerminationProcessException)throwable;
		Assert.assertEquals(
			ErrorExit.EXIT_CODE, terminationProcessException.getExitCode());
	}
}