@Test
public void testTocNumberOfPagesNoToc() {

    MergeParameters params = new MergeParameters();
    params.setTableOfContentsPolicy(ToCPolicy.NONE);
    params.addInput(new PdfMergeInput(mock(PdfFileSource.class)));
    TableOfContentsCreator victim = new TableOfContentsCreator(params, new PDDocument());
    assertEquals(0, victim.tocNumberOfPages());
}