### Question:
NotificationsContainer extends VBox { void addNotification(String title, Node message) { Platform.runLater(() -> { Notification toAdd = doAddNotification(title, message); fadeIn(toAdd, e -> toAdd.fadeAway(Duration.seconds(5))); }); } NotificationsContainer();   }### Answer:
@Test public void addNotification() { NotificationsContainer victim = new NotificationsContainer(); HBox node = new HBox(new Label("Chuck")); node.setId("chuck"); victim.addNotification("myTitle", node); WaitForAsyncUtils.waitForAsyncFx(2000, () -> assertNotNull(victim.lookup("#chuck"))); }