### Question:
DialogUtils { public static void decorateDialogWithIcon(Dialog<?> dlg) { Window window = dlg.getDialogPane().getScene().getWindow(); if (window instanceof Stage) { Stage stage = (Stage) dlg.getDialogPane().getScene().getWindow(); Collection<Image> icons = IconUtils.createWindowIcons(); stage.getIcons().addAll(icons); } } private  DialogUtils(); static Alert createAlert(AlertType type); static void decorateDialogWithIcon(Dialog<?> dlg);  }### Answer:
@Test public void testDecorateDialogWithIcon() { Alert dlg = new Alert(AlertType.ERROR); assertFalse(alertHasIcons(dlg)); DialogUtils.decorateDialogWithIcon(dlg); assertTrue(alertHasIcons(dlg)); }