@Test
public void outlineLevels() throws IOException {

    try (PDDocument doc = PDFParser.parse(
            SeekableSources.inMemorySeekableSourceFrom(getClass().getResourceAsStream("/pdf/test_outline.pdf")))) {
        Set<Integer> levels = OutlineUtils.getOutlineLevelsWithPageDestination(doc);
        assertEquals(3, levels.size());
        assertTrue(levels.contains(1));
        assertTrue(levels.contains(2));
        assertTrue(levels.contains(3));
    }
}