List<IncidentStatistics> incidentStatistics = definitionResult.getIncidentStatistics();
assertFalse(incidentStatistics.isEmpty());
assertEquals(1, incidentStatistics.size());
IncidentStatistics incident = incidentStatistics.get(0);
assertEquals(FailedJobIncidentHandler.INCIDENT_HANDLER_TYPE, incident.getIncidentType());
assertEquals(1, incident.getIncidentCount());
definitionResult = statistics.get(1);
Assert.assertEquals(1, definitionResult.getInstances());
Assert.assertEquals(1, definitionResult.getFailedJobs());
incidentStatistics = definitionResult.getIncidentStatistics();
assertFalse(incidentStatistics.isEmpty());
assertEquals(1, incidentStatistics.size());
incident = incidentStatistics.get(0);
assertEquals(FailedJobIncidentHandler.INCIDENT_HANDLER_TYPE, incident.getIncidentType());
assertEquals(1, incident.getIncidentCount());
repositoryService.deleteDeployment(deployment.getId(), true);
}