GusNotifier extends AuditNotifier { @Override protected boolean clearAdditionalNotification(NotificationContext context) { requireArgument(context != null, "Notification context cannot be null."); super.clearAdditionalNotification(context); boolean result = true; if (context.getNotification().isEnableClearNotification()) { result = sendGusNotification(context, NotificationStatus.CLEARED); } return result; } @Inject  GusNotifier(MetricService metricService, AnnotationService annotationService, AuditService auditService,
                            SystemConfiguration config, Provider<EntityManager> emf, MonitorService monitorService); @Override String getName(); boolean postToGus(History history,
                             Set<String> to,
                             String feed,
                             SystemConfiguration config,
                             NotificationContext context); @Override Properties getNotifierProperties();  }
@Test public void clearAdditionalNotification_testDisableClearNotification() throws Exception { context.getNotification().setEnableClearNotification(false); notifier = new GusNotifier(metricService, annotationService, auditService, config, emf, monitorService); boolean result = notifier.clearAdditionalNotification(context); assertTrue(result); verify(gusTransport, never()).getEndpointInfo(false); verify(gusTransport, never()).getEndpointInfo(true); verify(httpClient, never()).execute(any()); verify(httpResponse, never()).getStatusLine(); verify(httpResponseStatusLine, never()).getStatusCode(); verify(httpResponse, never()).close(); }