### Question:
SplitAfterPredefinedSetOfPagesRadioButton extends RadioButton implements SplitParametersBuilderCreator, RestorableView, ResettableView { @Override public void restoreStateFrom(Map<String, String> data) { Optional.ofNullable(data.get("splitAfterPredefined")).map(Boolean::valueOf).ifPresent(this::setSelected); Optional.ofNullable(data.get("splitAfterPredefined.combo")).map(PredefinedSetOfPages::valueOf) .map(KeyStringValueItem::keyEmptyValue).ifPresent(this.combo.getSelectionModel()::select); } SplitAfterPredefinedSetOfPagesRadioButton(ComboBox<KeyStringValueItem<PredefinedSetOfPages>> combo); @Override void resetView(); @Override SimpleSplitParametersBuilder getBuilder(Consumer<String> onError); @Override void saveStateTo(Map<String, String> data); @Override void restoreStateFrom(Map<String, String> data);  }### Answer:
@Test public void restoreState() { ComboBox<KeyStringValueItem<PredefinedSetOfPages>> combo = lookup("#combo").queryComboBox(); Map<String, String> data = new HashMap<>(); data.put("splitAfterPredefined", Boolean.TRUE.toString()); data.put("splitAfterPredefined.combo", PredefinedSetOfPages.EVEN_PAGES.toString()); WaitForAsyncUtils.waitForAsyncFx(2000, () -> victim.restoreStateFrom(data)); assertTrue(victim.isSelected()); assertEquals(PredefinedSetOfPages.EVEN_PAGES, combo.getSelectionModel().getSelectedItem().getKey()); }