@Test
public void fallbackHandlesBrokenDestinations() throws IOException {

    // https://github.com/torakiki/pdfsam/issues/361
    try (PDDocument document = PDFParser.parse(SeekableSources.inMemorySeekableSourceFrom(
            getClass().getClassLoader().getResourceAsStream("pdf/page_dests_with_number_insteadof_refs.pdf")))) {
        for (PDPage current : document.getPages()) {
            mapping.addLookupEntry(current, new PDPage());
        }
        PDDocumentOutline outline = new PDDocumentOutline();
        new OutlineDistiller(document).appendRelevantOutlineTo(outline, mapping);
        assertTrue(outline.hasChildren());
    }
}