### Question:
SingleSelectionPane extends VBox implements ModuleOwned, PdfDocumentDescriptorProvider, RestorableView { @Override public void saveStateTo(Map<String, String> data) { if (descriptor != null) { data.put(defaultString(getId()) + "input", descriptor.getFile().getAbsolutePath()); if (new DefaultUserContext().isSavePwdInWorkspaceFile()) { data.put(defaultString(getId()) + "input.password.enc", encrypt(descriptor.getPassword())); } } } SingleSelectionPane(String ownerModule); @Override PdfDocumentDescriptor getPdfDocumentDescriptor(); @Override void saveStateTo(Map<String, String> data); @Override void restoreStateFrom(Map<String, String> data); void addOnLoaded(Consumer<PdfDocumentDescriptor> onDescriptorLoaded); @EventListener void onClearSelected(ClearModuleEvent event); @EventListener void onLoadDocumentsRequest(PdfLoadRequestEvent loadEvent); @Override @EventStation String getOwnerModule(); void setPromptText(String text);  }### Answer:
@Test public void onSaveWorkspace() throws Exception { moveToLoadedStateWithSpecialChars(victim); Map<String, String> data = new HashMap<>(); victim.saveStateTo(data); assertNull(data.get("victim-selection-paneinput.password")); assertThat(data.get("victim-selection-paneinput"), Matchers.endsWith("संसकरण_test.pdf")); }
@Test public void onSaveWorkspaceEmptyDescriptor() { Map<String, String> data = new HashMap<>(); victim.saveStateTo(data); assertTrue(data.isEmpty()); }