@Test
public void write() throws TaskException {

    PDDocument doc = new PDDocument();
    PDPage page = new PDPage();
    doc.addPage(page);
    new FilenameFooterWriter(true, doc).addFooter(page, "My Footer", 20);
    assertThat(new PdfTextExtractorByArea().extractFooterText(page).trim(), is("My Footer 20"));
}