@Test
public void testSubprocessReactorCorruptedStream() throws Exception {

	List<ProcessLog> processLogs = new ArrayList<>();
	ProcessChannel<Serializable> processChannel =
		_localProcessExecutor.execute(
			_createJPDAProcessConfig(
				_JPDA_OPTIONS1,
				processLog -> {
					if (processLog.getLevel() == ProcessLog.Level.ERROR) {
						processLogs.add(processLog);
					}
				}),
			Operations.CORRUPTED_STREAM);
	Future<Serializable> future =
		processChannel.getProcessNoticeableFuture();
	try {
		future.get();
		Assert.fail();
	}
	catch (ExecutionException executionException) {
		Throwable throwable = executionException.getCause();
		Assert.assertTrue(throwable instanceof ProcessException);
		Assert.assertEquals(
			"Corrupted object input stream", throwable.getMessage());
		throwable = throwable.getCause();
		Assert.assertSame(
			StreamCorruptedException.class, throwable.getClass());
	}
	Assert.assertFalse(future.isCancelled());
	Assert.assertTrue(future.isDone());
	Assert.assertEquals(processLogs.toString(), 1, processLogs.size());
	ProcessLog processLog = processLogs.get(0);
	String message = processLog.getMessage();
	int index = message.lastIndexOf(' ');
	Assert.assertTrue(index != -1);
	Assert.assertEquals(
		"Dumping content of corrupted object input stream to",
		message.substring(0, index));
	File file = new File(message.substring(index + 1));
	Assert.assertTrue(file.exists());
	file.delete();
	Throwable throwable = processLog.getThrowable();
	Assert.assertSame(StreamCorruptedException.class, throwable.getClass());
}