// cause and root cause id is equal to the id of the root incident
assertEquals(rootCauseHistoricIncident.getId(), rootCauseHistoricIncident.getCauseIncidentId());
assertEquals(rootCauseHistoricIncident.getId(), rootCauseHistoricIncident.getRootCauseIncidentId());
HistoricIncident causeHistoricIncident = query.processInstanceId(pi2.getId()).singleResult();
assertNotNull(causeHistoricIncident);
// cause and root cause id is equal to the id of the root incident
assertEquals(rootCauseHistoricIncident.getId(), causeHistoricIncident.getCauseIncidentId());
assertEquals(rootCauseHistoricIncident.getId(), causeHistoricIncident.getRootCauseIncidentId());