### Question:
SummaryTab extends BaseInfoTab implements ChangeListener<PdfDescriptorLoadingStatus> { @EventListener void requestShow(ShowPdfDescriptorRequest event) { if (current != event.getDescriptor()) { current = event.getDescriptor(); current.loadingStatus().addListener(new WeakChangeListener<>(this)); } setFileProperties(current.getFile()); setPdfProperties(); } SummaryTab(); @Override void changed(ObservableValue<? extends PdfDescriptorLoadingStatus> observable,
            PdfDescriptorLoadingStatus oldValue, PdfDescriptorLoadingStatus newValue);  }### Answer:
@Test public void showRequest() throws Exception { File file = folder.newFile(); SummaryTab victim = new SummaryTab(); Set<Node> properties = ((ScrollPane) victim.getContent()).getContent().lookupAll(".info-property-value"); assertNotNull(properties); assertFalse(properties.isEmpty()); List<ChangeListener<? super String>> listeners = initListener(properties); PdfDocumentDescriptor descriptor = PdfDocumentDescriptor.newDescriptorNoPassword(file); fillDescriptor(descriptor); WaitForAsyncUtils.waitForAsyncFx(2000, () -> victim.requestShow(new ShowPdfDescriptorRequest(descriptor))); assertInfoIsDisplayed(listeners, descriptor); }
@Test public void onLoad() throws Exception { File file = folder.newFile(); SummaryTab victim = new SummaryTab(); Set<Node> properties = ((ScrollPane) victim.getContent()).getContent().lookupAll(".info-property-value"); assertNotNull(properties); assertFalse(properties.isEmpty()); List<ChangeListener<? super String>> listeners = initListener(properties); PdfDocumentDescriptor descriptor = PdfDocumentDescriptor.newDescriptorNoPassword(file); WaitForAsyncUtils.waitForAsyncFx(2000, () -> victim.requestShow(new ShowPdfDescriptorRequest(descriptor))); fillDescriptor(descriptor); descriptor.moveStatusTo(PdfDescriptorLoadingStatus.REQUESTED); descriptor.moveStatusTo(PdfDescriptorLoadingStatus.LOADING); descriptor.moveStatusTo(PdfDescriptorLoadingStatus.LOADED); assertInfoIsDisplayed(listeners, descriptor); }