@Test
public void testSubprocessReactorKillByCancel() throws Exception {

	List<ProcessLog> processLogs = new ArrayList<>();
	ProcessChannel<String> processChannel = _localProcessExecutor.execute(
		_createJPDAProcessConfig(
			_JPDA_OPTIONS1,
			processLog -> {
				if (processLog.getLevel() == ProcessLog.Level.ERROR) {
					processLogs.add(processLog);
				}
			}),
		Operations.asControllable(Operations.SLEEP));
	Future<Controller> future = processChannel.write(
		Operations.GET_CONTROLLER);
	Controller controller = future.get();
	Assert.assertTrue(controller.isAlive());
	Map<String, Object> attributes =
		LocalProcessLauncher.ProcessContext.getAttributes();
	BlockingQueue<Thread> reactorThreadBlockingQueue =
		new SynchronousQueue<>();
	attributes.put(
		"reactorThreadBlockingQueue", reactorThreadBlockingQueue);
	controller.invoke(
		() -> {
			try {
				LocalProcessLauncher.ProcessContext.writeProcessCallable(
					() -> {
						Map<String, Object> localAttributes =
							LocalProcessLauncher.ProcessContext.
								getAttributes();
						BlockingQueue<Thread>
							localReactorThreadBlockingQueue =
								(BlockingQueue<Thread>)
									localAttributes.remove(
										"reactorThreadBlockingQueue");
						try {
							localReactorThreadBlockingQueue.put(
								Thread.currentThread());
						}
						catch (InterruptedException interruptedException) {
							throw new ProcessException(
								interruptedException);
						}
						return null;
					});
			}
			catch (IOException ioException) {
				throw new ProcessException(ioException);
			}
			return null;
		});
	Thread reactorThread = reactorThreadBlockingQueue.take();
	NoticeableFuture<String> noticeableFuture =
		processChannel.getProcessNoticeableFuture();
	noticeableFuture.cancel(false);
	reactorThread.join();
	Assert.assertEquals(processLogs.toString(), 1, processLogs.size());
	ProcessLog processLog = processLogs.get(0);
	Assert.assertEquals("Abort subprocess piping", processLog.getMessage());
	Throwable throwable = processLog.getThrowable();
	Assert.assertSame(IOException.class, throwable.getClass());
}