@Test
public void testClearNotificationWhenImageSendingIsDisabled() {

    UserService userService = system.getServiceFactory().getUserService();
    Alert alert = generateAlert("testAlert", userService.findAdminUser(), "-1h:"+METRIC_NAME);
    alert.setEnabled(true);
    _setAlertId(alert, "1");
    Trigger trigger = getTrigger(alert, TriggerType.GREATER_THAN, "testTrigger", "2.0", "1");
    List<Trigger> triggerList = ImmutableList.of(trigger);
    alert.setTriggers(triggerList);
    Notification notification = getNotification("EmailNotifier",
            EmailNotifier.class.getName(), alert, ImmutableList.of("test@salesforce.com"));
    alert.addNotification(notification);
    Metric metric = createMetric();
    History history = getHistory();
    Pair<String, byte[]> evaluatedMetricSnapshotDetails = Pair.of("img1", "Test String".getBytes());
    alertService.sendClearNotification(trigger, metric, history, notification, alert, 2L, "missingdata");
    verify(_imageDataRetrieverMock, never()).getAnnotatedImage(any(ImageDataRetrievalContext.class));
    verify(_imageDataRetrieverMock, never()).getImageURL(evaluatedMetricSnapshotDetails);
}