### Question:
MergeOptionsPane extends VBox implements TaskParametersBuildStep<MergeParametersBuilder>, RestorableView, ResettableView { @Override public void saveStateTo(Map<String, String> data) { data.put("outline", Optional.ofNullable(outline.getSelectionModel().getSelectedItem()) .map(i -> i.getKey().toString()).orElse(EMPTY)); data.put("acroForms", Optional.ofNullable(acroForms.getSelectionModel().getSelectedItem()) .map(i -> i.getKey().toString()).orElse(EMPTY)); data.put("toc", Optional.ofNullable(toc.getSelectionModel().getSelectedItem()).map(i -> i.getKey().toString()) .orElse(EMPTY)); data.put("blankIfOdd", Boolean.toString(blankIfOdd.isSelected())); data.put("footer", Boolean.toString(footer.isSelected())); data.put("normalize", Boolean.toString(normalize.isSelected())); } 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 onSaveWorkspace() { clickOn("#blankIfOddCheck"); Map<String, String> data = new HashMap<>(); victim.saveStateTo(data); assertEquals(OutlinePolicy.RETAIN.toString(), data.get("outline")); assertEquals(Boolean.TRUE.toString(), data.get("blankIfOdd")); assertEquals(Boolean.FALSE.toString(), data.get("footer")); assertEquals(Boolean.FALSE.toString(), data.get("normalize")); assertEquals(AcroFormPolicy.MERGE.toString(), data.get("acroForms")); assertEquals(ToCPolicy.NONE.toString(), data.get("toc")); }