@Test(expected = ExecutionException.class)
public void hangingIssue() throws Exception {

    LocalCommandExecutor localCommandExecutor = new AbstractLocalCommandExecutor() {
        @Override
        void nonZeroLog(List<String> cmdLs, int exitCode) {
        }
        @Override
        public int execute(String program, List<String> args, Path outFile, Path errFile, Path workingDir, Map<String, String> env) throws IOException, InterruptedException {
            return 0;
        }
    };
    try (ComputationManager computationManager = new LocalComputationManager(config, localCommandExecutor, ForkJoinPool.commonPool())) {
        CompletableFuture<Object> result = computationManager.execute(ExecutionEnvironment.createDefault(), new AbstractExecutionHandler<Object>() {
            @Override
            public List<CommandExecution> before(Path workingDir) {
                throw new AssertionError("Oups");
            }
        });
        // check that code is not hanging anymore when a java.lang.Error is thrown inside before
        result.get(100, TimeUnit.MILLISECONDS);
    }
}