@Test(expected = IllegalArgumentException.class)
public void testDirectory() {

    File file = mock(File.class);
    when(file.isFile()).thenReturn(Boolean.FALSE);
    PdfFileSource.newInstanceNoPassword(file);
}