### Question:
PdfDestinationPane extends DestinationPane implements ModuleOwned, RestorableView, ResettableView,
        TaskParametersBuildStep<AbstractPdfOutputParametersBuilder<? extends AbstractPdfOutputParameters>> { @Override public void saveStateTo(Map<String, String> data) { data.put("compress", Boolean.toString(compress.isSelected())); data.put("overwrite", Boolean.toString(overwrite().isSelected())); discardBookmarks.ifPresent(d -> { data.put("discardBookmarks", Boolean.toString(d.isSelected())); }); data.put("version", version.getSelectionModel().getSelectedItem().getVersion().toString()); } PdfDestinationPane(BrowsableField destination, String ownerModule, UserContext userContext,
            DestinationPanelFields... optionalFields);  PdfDestinationPane(BrowsableField destination, String ownerModule, UserContext userContext,
            boolean expandAdvanced, DestinationPanelFields... optionalFields); void enableSameAsSourceItem(); @Override @EventStation String getOwnerModule(); @EventListener void setDestination(SetDestinationRequest event); @Override void resetView(); @Override void apply(AbstractPdfOutputParametersBuilder<? extends AbstractPdfOutputParameters> builder,
            Consumer<String> onError); @Override void saveStateTo(Map<String, String> data); @Override void restoreStateFrom(Map<String, String> data);  }### Answer:
@Test public void saveState() { victim.overwrite().setSelected(true); Map<String, String> data = new HashMap<>(); victim.saveStateTo(data); assertEquals(Boolean.TRUE.toString(), data.get("overwrite")); assertEquals(Boolean.TRUE.toString(), data.get("compress")); assertNull(data.get("discardBookmarks")); assertTrue(isNotEmpty(data.get("version"))); }