@Test
public void keepOneBranch() {

    mapping.addLookupEntry(document.getPage(2), new PDPage());
    PDDocumentOutline outline = new PDDocumentOutline();
    new OutlineDistiller(document).appendRelevantOutlineTo(outline, mapping);
    assertTrue(outline.hasChildren());
    assertEquals(2, outline.getOpenCount());
}