@Deployment(resources={"org/camunda/bpm/engine/test/api/runtime/oneFailingServiceProcess.bpmn20.xml"})
public void testPropertiesOfHistoricIncident() {
startProcessInstance(PROCESS_DEFINITION_KEY);
Incident incident = runtimeService.createIncidentQuery().singleResult();
assertNotNull(incident);
HistoricIncident historicIncident = historyService.createHistoricIncidentQuery().singleResult();
assertNotNull(historicIncident);
assertEquals(incident.getId(), historicIncident.getId());
assertEquals(incident.getIncidentTimestamp(), historicIncident.getCreateTime());
assertNull(historicIncident.getEndTime());
assertEquals(incident.getIncidentType(), historicIncident.getIncidentType());
assertEquals(incident.getIncidentMessage(), historicIncident.getIncidentMessage());
assertEquals(incident.getExecutionId(), historicIncident.getExecutionId());
assertEquals(incident.getActivityId(), historicIncident.getActivityId());
assertEquals(incident.getProcessInstanceId(), historicIncident.getProcessInstanceId());
assertEquals(incident.getProcessDefinitionId(), historicIncident.getProcessDefinitionId());
assertEquals(incident.getCauseIncidentId(), historicIncident.getCauseIncidentId());
assertEquals(incident.getRootCauseIncidentId(), historicIncident.getRootCauseIncidentId());
assertEquals(incident.getConfiguration(), historicIncident.getConfiguration());
assertTrue(historicIncident.isOpen());
assertFalse(historicIncident.isDeleted());
assertFalse(historicIncident.isResolved());
}