### Question:
PdfContentTypeChecker { public PdfContent determineDocContentType(InputStream stream) { try { PDDocument document = PDDocument.load(stream); return determineDocContentType(document); } catch (Exception e) { return PdfContent.UNKNOWN; } }  PdfContent determineDocContentType(InputStream stream); PdfContent determineDocContentType(PDDocument document);  }### Answer:
@Test public void testPdfTypeChecker() throws Exception { InputStream stream = AlterPDFParserTest.class.getResourceAsStream("/test-documents/scanned.pdf"); PdfContentTypeChecker checker = new PdfContentTypeChecker(); PdfContentTypeChecker.PdfContent docType = checker.determineDocContentType(stream); assertEquals(PdfContentTypeChecker.PdfContent.IMAGES, docType); }