### Question:
MergeOptionsPane extends VBox implements TaskParametersBuildStep<MergeParametersBuilder>, RestorableView, ResettableView { @Override public void restoreStateFrom(Map<String, String> data) { Optional.ofNullable(data.get("outline")).map(OutlinePolicy::valueOf).map(r -> keyEmptyValue(r)) .ifPresent(r -> this.outline.getSelectionModel().select(r)); Optional.ofNullable(data.get("acroForms")).map(AcroFormPolicy::valueOf).map(r -> keyEmptyValue(r)) .ifPresent(r -> this.acroForms.getSelectionModel().select(r)); Optional.ofNullable(data.get("toc")).map(ToCPolicy::valueOf).map(r -> keyEmptyValue(r)) .ifPresent(r -> this.toc.getSelectionModel().select(r)); blankIfOdd.setSelected(Boolean.valueOf(data.get("blankIfOdd"))); footer.setSelected(Boolean.valueOf(data.get("footer"))); normalize.setSelected(Boolean.valueOf(data.get("normalize"))); } MergeOptionsPane(); @Override void resetView(); @Override void apply(MergeParametersBuilder builder, Consumer<String> onError); @Override void saveStateTo(Map<String, String> data); @Override void restoreStateFrom(Map<String, String> data);  }### Answer:
@Test public void restoreStateFrom() { ComboBox<KeyStringValueItem<OutlinePolicy>> outline = lookup("#outlineCombo").queryComboBox(); ComboBox<KeyStringValueItem<AcroFormPolicy>> forms = lookup("#acroFormsCombo").queryComboBox(); ComboBox<KeyStringValueItem<AcroFormPolicy>> toc = lookup("#tocCombo").queryComboBox(); CheckBox blankIfOdd = lookup("#blankIfOddCheck").queryAs(CheckBox.class); CheckBox footer = lookup("#footerCheck").queryAs(CheckBox.class); CheckBox normalize = lookup("#normalizeCheck").queryAs(CheckBox.class); Map<String, String> data = new HashMap<>(); data.put("outline", OutlinePolicy.ONE_ENTRY_EACH_DOC.toString()); data.put("acroForms", AcroFormPolicy.MERGE_RENAMING_EXISTING_FIELDS.toString()); data.put("blankIfOdd", Boolean.FALSE.toString()); data.put("footer", Boolean.TRUE.toString()); data.put("normalize", Boolean.TRUE.toString()); data.put("toc", ToCPolicy.DOC_TITLES.toString()); WaitForAsyncUtils.waitForAsyncFx(2000, () -> victim.restoreStateFrom(data)); assertEquals(OutlinePolicy.ONE_ENTRY_EACH_DOC, outline.getSelectionModel().getSelectedItem().getKey()); assertEquals(AcroFormPolicy.MERGE_RENAMING_EXISTING_FIELDS, forms.getSelectionModel().getSelectedItem().getKey()); assertEquals(ToCPolicy.DOC_TITLES, toc.getSelectionModel().getSelectedItem().getKey()); assertFalse(blankIfOdd.isSelected()); assertTrue(footer.isSelected()); assertTrue(normalize.isSelected()); }