@Test(expected = TaskIOException.class)
public void openDocumentError() throws TaskIOException {

    new DefaultPdfSourceOpener().open(PdfStreamSource.newInstanceNoPassword(
            getClass().getClassLoader().getResourceAsStream("pdf/not_a_pdf.pdf"), "my source"));
}