@Test
public void testShouldGenerateToC() {

    MergeParameters params = new MergeParameters();
    params.setTableOfContentsPolicy(ToCPolicy.DOC_TITLES);
    assertTrue(new TableOfContentsCreator(params, new PDDocument()).shouldGenerateToC());
    assertFalse(new TableOfContentsCreator(new MergeParameters(), new PDDocument()).shouldGenerateToC());
    params.setTableOfContentsPolicy(null);
    assertFalse(new TableOfContentsCreator(new MergeParameters(), new PDDocument()).shouldGenerateToC());
}