assertNotNull(callFailingProcess);
Incident causeIncident = runtimeService.createIncidentQuery().processDefinitionId(callFailingProcess.getProcessDefinitionId()).singleResult();
assertNotNull(causeIncident);
Execution theCallActivityExecution = runtimeService.createExecutionQuery().activityId("theCallActivity").singleResult();
assertNotNull(theCallActivityExecution);
assertNotNull(causeIncident.getId());
assertNotNull(causeIncident.getIncidentTimestamp());
assertEquals(FailedJobIncidentHandler.INCIDENT_HANDLER_TYPE, causeIncident.getIncidentType());
assertNull(causeIncident.getIncidentMessage());
assertEquals(theCallActivityExecution.getId(), causeIncident.getExecutionId());
assertEquals("theCallActivity", causeIncident.getActivityId());
assertEquals(callFailingProcess.getId(), causeIncident.getProcessInstanceId());
assertEquals(rootCauseIncident.getId(), causeIncident.getCauseIncidentId());
assertEquals(rootCauseIncident.getId(), causeIncident.getRootCauseIncidentId());
assertNull(causeIncident.getConfiguration());
// Top level incident of the startet process (recursive created incident for super super process instance)
Incident topLevelIncident = runtimeService.createIncidentQuery().processDefinitionId(processInstance.getProcessDefinitionId()).singleResult();
assertNotNull(topLevelIncident);
Execution theCallingCallActivity = runtimeService.createExecutionQuery().activityId("theCallingCallActivity").singleResult();
assertNotNull(theCallingCallActivity);
assertNotNull(topLevelIncident.getId());
assertNotNull(topLevelIncident.getIncidentTimestamp());
assertEquals(FailedJobIncidentHandler.INCIDENT_HANDLER_TYPE, topLevelIncident.getIncidentType());
assertNull(topLevelIncident.getIncidentMessage());
assertEquals(theCallingCallActivity.getId(), topLevelIncident.getExecutionId());
assertEquals("theCallingCallActivity", topLevelIncident.getActivityId());
assertEquals(processInstance.getId(), topLevelIncident.getProcessInstanceId());
assertEquals(causeIncident.getId(), topLevelIncident.getCauseIncidentId());
assertEquals(rootCauseIncident.getId(), topLevelIncident.getRootCauseIncidentId());
assertNull(topLevelIncident.getConfiguration());