### Question:
PdfUtilities { public static void splitPdf(String inputPdfFile, String outputPdfFile, String firstPage, String lastPage) { if (firstPage.trim().isEmpty()) { firstPage = "0"; } if (lastPage.trim().isEmpty()) { lastPage = "0"; } splitPdf(new File(inputPdfFile), new File(outputPdfFile), Integer.parseInt(firstPage), Integer.parseInt(lastPage)); }  static File convertPdf2Tiff(File inputPdfFile); static File[] convertPdf2Png(File inputPdfFile); static void splitPdf(String inputPdfFile, String outputPdfFile, String firstPage, String lastPage); static void splitPdf(File inputPdfFile, File outputPdfFile, int firstPage, int lastPage); static int getPdfPageCount(String inputPdfFile); static int getPdfPageCount(File inputPdfFile); static void mergePdf(File[] inputPdfFiles, File outputPdfFile); static final String GS_INSTALL; }### Answer:
@Test public void testSplitPdf() { logger.info("splitPdf"); File inputPdfFile = new File(String.format("%s/%s", TEST_RESOURCES_DATA_PATH, "multipage-pdf.pdf")); File outputPdfFile = new File(String.format("%s/%s", TEST_RESOURCES_RESULTS_PATH, "multipage-pdf_splitted.pdf")); int startPage = 2; int endPage = 3; int expResult = 2; PdfUtilities.splitPdf(inputPdfFile, outputPdfFile, startPage, endPage); int pageCount = PdfUtilities.getPdfPageCount(outputPdfFile); assertEquals(expResult, pageCount); }