### Question:
BookmarksLevelSAMBoxLoader implements PdfLoader<PDDocument> { @Override public void accept(PDDocument document, PdfDocumentDescriptor descriptor) { descriptor.setValidBookmarksLevels(OutlineUtils.getOutlineLevelsWithPageDestination(document)); }  @Override void accept(PDDocument document, PdfDocumentDescriptor descriptor); @Override RequiredPdfData key();  }### Answer:
@Test public void accept() { new BookmarksLevelSAMBoxLoader().accept(document, descriptor); ArgumentCaptor<Set> captor = ArgumentCaptor.forClass(Set.class); verify(descriptor).setValidBookmarksLevels(captor.capture()); assertThat((Set<Integer>) captor.getValue(), hasItems(1, 2, 3)); }