### Question:
SplitOptionsPane extends HBox implements TaskParametersBuildStep<SplitBySizeParametersBuilder>, RestorableView, ResettableView { @Override public void restoreStateFrom(Map<String, String> data) { field.setText(Optional.ofNullable(data.get("size")).orElse(EMPTY)); group.getToggles().stream().map(t -> { return (SizeUnitRadio) t; }).forEach(s -> s.restoreStateFrom(data)); } SplitOptionsPane(); @Override void apply(SplitBySizeParametersBuilder builder, Consumer<String> onError); @Override void saveStateTo(Map<String, String> data); @Override void restoreStateFrom(Map<String, String> data); @Override void resetView();  }### Answer:
@Test public void restoreState() { SizeUnitRadio kilo = lookup("#unit" + SizeUnit.KILOBYTE.symbol()).queryAs(SizeUnitRadio.class); SizeUnitRadio mega = lookup("#unit" + SizeUnit.MEGABYTE.symbol()).queryAs(SizeUnitRadio.class); Map<String, String> data = new HashMap<>(); data.put("size", "100"); data.put(SizeUnit.MEGABYTE.toString(), Boolean.TRUE.toString()); victim.restoreStateFrom(data); TextInputControl field = lookup("#sizeField").queryTextInputControl(); assertEquals("100", field.getText()); assertTrue(mega.isSelected()); assertFalse(kilo.isSelected()); }