// Create history item by changing its state
api().setState(alarmName, "Updating the state.", null, Alarm.State.OK);
// Poll for alarm history
ListAlarmHistoryOptions daho = new ListAlarmHistoryOptions().alarmName(alarmName);
success = retry(new Predicate<ListAlarmHistoryOptions>() {
public boolean apply(ListAlarmHistoryOptions options) {
for (IterableWithMarker<AlarmHistoryItem> page : api().listHistory(options)) {
for (AlarmHistoryItem alarmHistoryItem : page) {
if (alarmHistoryItem.getAlarmName().equals(alarmName)) {