@Test
public void write_long_filename_that_needs_truncation() throws TaskException {

    PDDocument doc = new PDDocument();
    PDPage page = new PDPage();
    doc.addPage(page);
    new FilenameFooterWriter(true, doc).addFooter(page, "My very long title that will not fit on the page and needs to be truncated so that it will not overflow and cover the page number and generally look not so nice", 20);
    assertPageFooterText(page,"My very long title that will not fit on the page and needs to be truncated so that it will not overflow and cover the page number a20");
}