@Test
public void testAppendItem() {

    MergeParameters params = new MergeParameters();
    params.setTableOfContentsPolicy(ToCPolicy.DOC_TITLES);
    TableOfContentsCreator victim = new TableOfContentsCreator(params, new PDDocument());
    assertFalse(victim.hasToc());
    victim.appendItem("text", 10, new PDPage());
    assertTrue(victim.hasToc());
}