@Test
public void testExecuteScheduledAlerts_DuringDatalagPresentWithWhiteListedUserWithNoDataWithSuccessfulEvaluation() {

    ServiceFactory sFactory = system.getServiceFactory();
    UserService userService = sFactory.getUserService();
    int triggerMinValue = 50, inertiaPeriod = 1000;
    int cooldownPeriod = 1000 * 5;
    final AtomicInteger notificationCount = new AtomicInteger(0);
    final AtomicInteger clearCount = new AtomicInteger(0);
    Alert alert = new Alert(userService.findDefaultUser(), userService.findDefaultUser(), "testAlert", "-1h:scope:metric:avg", "* * * * *");
    _setAlertId(alert, "100001");
    Trigger trigger = new Trigger(alert, TriggerType.NO_DATA, "testTrigger", triggerMinValue, inertiaPeriod);
    _setTriggerId(trigger, "100002");
    Notification notification = new Notification("testNotification", alert, AuditNotifier.class.getName(), new ArrayList<String>(),
            cooldownPeriod);
    _setNotificationId(notification, "100003");
    alert.setTriggers(Arrays.asList(trigger));
    alert.setNotifications(Arrays.asList(notification));
    notification.setTriggers(alert.getTriggers());
    alert.setEnabled(true);
    DefaultAlertService spyAlertService = _initializeSpyAlertServiceWithStubs(notificationCount, clearCount,
            Arrays.asList(), alert, notification, true);
    assertEquals(new Integer(1), spyAlertService.executeScheduledAlerts(1, 1000));
    assertEquals(1, notificationCount.get());
    enableDatalagMonitoring(false);
}