### Question:
NotificationsController { @EventListener public void onAddRequest(AddNotificationRequestEvent event) { container.addNotification(event.title, buildLabel(event.message, event.type)); } @Inject  NotificationsController(NotificationsContainer container, UsageService service, Pdfsam pdfsam,
            UserContext userContext); @EventListener void onAddRequest(AddNotificationRequestEvent event); @EventListener void onTaskFailed(TaskExecutionFailedEvent e); @EventListener void onTaskCompleted(@SuppressWarnings("unused") TaskExecutionCompletedEvent e); @EventListener void onRemoveRequest(RemoveNotificationRequestEvent event); @EventListener void onUpdateAvailable(UpdateAvailableEvent event); @EventListener void onNoUpdateAvailable(NoUpdateAvailable event); @EventListener void onNewImportantNews(NewImportantNewsEvent event);  }### Answer:
@Test public void onAddRequest() { AddNotificationRequestEvent event = new AddNotificationRequestEvent(NotificationType.INFO, "msg", "title"); victim.onAddRequest(event); verify(container).addNotification(eq("title"), any()); }