@Test(timeout=10000)
public void testRunProcessWithAsyncHandlerSkipExecutionError() throws Exception {

    final NodeLeftCountDownProcessEventListener countDownListener = new NodeLeftCountDownProcessEventListener("Handling error", 1);
    ((ExecutorServiceImpl) executorService).setRetries(0);
    RuntimeEnvironment environment = RuntimeEnvironmentBuilder.Factory.get().newDefaultBuilder()
            .userGroupCallback(userGroupCallback)
            .addAsset(ResourceFactory.newClassPathResource("BPMN2-ScriptTaskErrorHandling.bpmn2"), ResourceType.BPMN2)
            .registerableItemsFactory(new DefaultRegisterableItemsFactory() {
                @Override
                public Map<String, WorkItemHandler> getWorkItemHandlers(RuntimeEngine runtime) {
                    Map<String, WorkItemHandler> handlers = super.getWorkItemHandlers(runtime);
                    handlers.put("async", new AsyncWorkItemHandler(executorService, "org.jbpm.executor.ThrowExceptionCommand"));
                    return handlers;
                }
                @Override
                public List<ProcessEventListener> getProcessEventListeners( RuntimeEngine runtime) {
                    List<ProcessEventListener> listeners = super.getProcessEventListeners(runtime);
                    listeners.add(countDownListener);
                    return listeners;
                }
            })
            .get();
    
    manager = RuntimeManagerFactory.Factory.get().newSingletonRuntimeManager(environment); 
    assertNotNull(manager);
    
    RuntimeEngine runtime = manager.getRuntimeEngine(EmptyContext.get());
    KieSession ksession = runtime.getKieSession();
    assertNotNull(ksession);       
    
    Map<String, Object> params = new HashMap<>();
    params.put("command", "org.jbpm.executor.ThrowExceptionCommand");
    ProcessInstance processInstance = ksession.startProcess("ScriptTask", params);
    assertEquals(ProcessInstance.STATE_ACTIVE, processInstance.getState());
    
    countDownListener.waitTillCompleted();
    
    List<RequestInfo> errorJobs = executorService.getInErrorRequests(new QueryContext());
    assertEquals(1, errorJobs.size());
    RequestInfo errorJob = errorJobs.get(0);
    assertEquals(errorJob.getProcessInstanceId().longValue(), processInstance.getId());
    
    processInstance = runtime.getKieSession().getProcessInstance(processInstance.getId());
    assertNull(processInstance);               
    
    ExecutionErrorManager errorManager = ((AbstractRuntimeManager) manager).getExecutionErrorManager();
    assertNotNull("ErrorManager is null", errorManager);
    ExecutionErrorStorage errorStorage = errorManager.getStorage();
    assertNotNull("ErrorStorage is null", errorStorage);
    
    List<ExecutionError> errors = errorStorage.list(0, 10);
    assertEquals(0, errors.size());
    
}