### Question:
NotificationsController { @EventListener public void onNewImportantNews(NewImportantNewsEvent event) { VBox content = new VBox(3, buildLabel(event.news.getContent(), null), styledUrlButton( DefaultI18nContext.getInstance().i18n("Open"), event.news.getLink(), FontAwesomeIcon.EXTERNAL_LINK)); content.setAlignment(Pos.TOP_RIGHT); container.addStickyNotification(event.news.getTitle(), content); } @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 onNewImportantNews() { NewsData data = new NewsData(); data.setTitle("title"); data.setContent("content"); data.setLink("link"); NewImportantNewsEvent event = new NewImportantNewsEvent(data); victim.onNewImportantNews(event); verify(container).addStickyNotification(eq("title"), any()); }