@Test
 public void createImagesFromPdfWithExtensionTxtTest() throws Exception {
   String filePdfWithExtensionTxtPath =
       getClass().getResource("/5-pages-pdfWithOtherExtension.txt").getFile();
   try {
     service.createImagesFromPdf(new File(filePdfWithExtensionTxtPath));
   } catch (Exception e) {
     Assert.fail();
   }
 }
  @Test
  public void createImagesFromPDfTest() throws Exception {
    String pdfFilePath = getClass().getResource("/5-pages.pdf").getFile();

    ReturnPdfToImage returnPdfToImage = service.createImagesFromPdf(new File(pdfFilePath));

    Assert.assertTrue(returnPdfToImage.pageCount == 5);
    Assert.assertEquals(returnPdfToImage.imageTypeOut, ImageTypeEnum.JPG);

    File directoryOutExpected = new File(getClass().getResource("/images").getFile());
    Assert.assertEquals(returnPdfToImage.imagesDirectoryOut, directoryOutExpected);
    Assert.assertTrue(directoryOutExpected.exists());
    Assert.assertTrue(directoryOutExpected.listFiles().length == 5);
  }