### Question:
RotateOptionsPane extends HBox implements TaskParametersBuildStep<RotateParametersBuilder>, RestorableView, ResettableView { @Override public void saveStateTo(Map<String, String> data) { data.put("rotation", Optional.ofNullable(rotation.getSelectionModel().getSelectedItem()) .map(i -> i.getKey().toString()).orElse(EMPTY)); data.put("rotationType", Optional.ofNullable(rotationType.getSelectionModel().getSelectedItem()) .map(i -> i.getKey().toString()).orElse(EMPTY)); } RotateOptionsPane(); @Override void resetView(); @Override void apply(RotateParametersBuilder builder, Consumer<String> onError); @Override void saveStateTo(Map<String, String> data); @Override void restoreStateFrom(Map<String, String> data);  }### Answer:
@Test public void onSaveWorkspace() { Map<String, String> data = new HashMap<>(); victim.saveStateTo(data); assertEquals(Rotation.DEGREES_90.toString(), data.get("rotation")); assertEquals(PredefinedSetOfPages.ALL_PAGES.toString(), data.get("rotationType")); }