### Question:
NotificationsController { @EventListener public void onUpdateAvailable(UpdateAvailableEvent event) { VBox content = new VBox(3, buildLabel(DefaultI18nContext.getInstance().i18n("PDFsam {0} is available for download", event.availableVersion), NotificationType.INFO), styledUrlButton(DefaultI18nContext.getInstance().i18n("Download"), pdfsam.property(ConfigurableProperty.DOWNLOAD_URL), null)); content.setAlignment(Pos.TOP_RIGHT); container.addStickyNotification(DefaultI18nContext.getInstance().i18n("New version available"), 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 onUpdateAvailable() { UpdateAvailableEvent event = new UpdateAvailableEvent("new version"); victim.onUpdateAvailable(event); verify(container).addStickyNotification(anyString(), any()); }