@Test
public void testAlertAfter2Failures() throws Exception {

	Check check = createCheckCheckingMean(2, 6);
	when(alertingPlugin.getChecks()).thenReturn(Collections.singletonMap(check.getId(), check));
	checkMetrics();
	verify(alerter, times(0)).alert(any(Alerter.AlertArguments.class));
	verify(incidentRepository).createIncident(any(Incident.class));
	checkMetrics();
	verify(alerter).alert(any(Alerter.AlertArguments.class));
	verify(incidentRepository).updateIncident(any(Incident.class));
}