### Question:
Footer extends HBox implements ModuleOwned { @EventListener public void onTaskCompleted(TaskExecutionCompletedEvent event) { failed.setVisible(false); openButton.setVisible(true); statusLabel.setText(DefaultI18nContext.getInstance().i18n("Completed")); bar.setProgress(1); } Footer(RunButton runButton, OpenButton openButton, String ownerModule); OpenButton openButton(); RunButton runButton(); @Override @EventStation String getOwnerModule(); @EventListener void onTaskCompleted(TaskExecutionCompletedEvent event); @EventListener void onTaskFailed(TaskExecutionFailedEvent event); @EventListener void onProgress(PercentageOfWorkDoneChangedEvent event);  }### Answer:
@Test public void onTaskCompleted() { TaskExecutionCompletedEvent event = mock(TaskExecutionCompletedEvent.class); victim.onTaskCompleted(event); assertFalse(victim.lookup(".footer-failed-button").isVisible()); assertTrue(victim.lookup(".footer-open-button").isVisible()); assertEquals(DefaultI18nContext.getInstance().i18n("Completed"), ((Labeled) victim.lookup(".status-label")).getText()); assertEquals(1, ((ProgressBar) victim.lookup(".pdfsam-footer-bar")).getProgress(), 0.01); }