return String.format("%s: [%s] %s", msg, alert.getClass().getSimpleName(),
alert);
}
private List<Alert> unexpectedAlerts() {
AlertPolicy alertPolicy = getAlertPolicy();
List<Alert> result = Lists.newArrayList();
for (Alert alert : actualAlerts) {
if ((alertPolicy.getSeverity(alert) != Alert.Severity.INFO)
&& !expectedAlerts.contains(alert)) {
result.add(alert);
}
}
return result;