### Question:
SplitOptionsPane extends HBox implements TaskParametersBuildStep<SplitBySizeParametersBuilder>, RestorableView, ResettableView { @Override public void saveStateTo(Map<String, String> data) { data.put("size", defaultString(field.getText())); group.getToggles().stream().map(t -> { return (SizeUnitRadio) t; }).forEach(s -> s.saveStateTo(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 saveState() { clickOn("#sizeField").write("3000").push(KeyCode.ENTER); clickOn("#unit" + SizeUnit.KILOBYTE.symbol()); Map<String, String> data = new HashMap<>(); victim.saveStateTo(data); assertEquals("3000", data.get("size")); assertFalse(Boolean.valueOf(data.get(SizeUnit.MEGABYTE.toString()))); assertTrue(Boolean.valueOf(data.get(SizeUnit.KILOBYTE.toString()))); }