### Question:
SingleSelectionPane extends VBox implements ModuleOwned, PdfDocumentDescriptorProvider, RestorableView { public void addOnLoaded(Consumer<PdfDocumentDescriptor> onDescriptorLoaded) { this.onLoaded = onDescriptorLoaded.andThen(this.onLoaded); } 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 additionalOnLoadedConsumer() throws Exception { HitConsumer<PdfDocumentDescriptor> consumer = new HitConsumer<>(); victim.addOnLoaded(consumer); moveToLoadedState(victim); assertTrue(consumer.isHit()); }
@Test public void additionalOnLoadedConsumerNotHit() throws Exception { HitConsumer<PdfDocumentDescriptor> consumer = new HitConsumer<>(); victim.addOnLoaded(consumer); moveToEncrytedState(victim); assertFalse(consumer.isHit()); }