### Question:
NotificationManager { public void sendNotification (ChaosNotification chaosNotification) { if (notificationMethods != null) { for (NotificationMethods notif : notificationMethods) { notif.logNotification(chaosNotification); } } } @Autowired private  NotificationManager();   NotificationManager(Collection<NotificationMethods> notificationMethods); void sendNotification(ChaosNotification chaosNotification); @Scheduled(initialDelay = 1000 * 60, fixedDelay = 1000 * 5) void flushBuffers();  }### Answer:
@Test public void sendMessage () { NotificationManager notificationManager = new NotificationManager(notificationMethodList); notificationManager.sendNotification(chaosMessage); verify(notificationMethod, times(1)).logNotification(chaosMessage); }
@Test public void sendEvent () { NotificationManager notificationManager = new NotificationManager(notificationMethodList); notificationManager.sendNotification(chaosExperimentEvent); verify(notificationMethod, times(1)).logNotification(chaosExperimentEvent); }