@Test
    public void testVersions() throws Exception {

        Map<String, String> dcFormat = new HashMap<>();
        dcFormat.put("4.x", "application/pdf; version=1.3");
        dcFormat.put("5.x", "application/pdf; version=1.4");
        dcFormat.put("6.x", "application/pdf; version=1.5");
        dcFormat.put("7.x", "application/pdf; version=1.6");
        dcFormat.put("8.x", "application/pdf; version=1.7");
        dcFormat.put("9.x", "application/pdf; version=1.7");
        dcFormat.put("10.x", "application/pdf; version=1.7");
        dcFormat.put("11.x.PDFA-1b", "application/pdf; version=1.7");

        Map<String, String> pdfVersions = new HashMap<>();
        pdfVersions.put("4.x", "1.3");
        pdfVersions.put("5.x", "1.4");
        pdfVersions.put("6.x", "1.5");
        pdfVersions.put("7.x", "1.6");
        pdfVersions.put("8.x", "1.7");
        pdfVersions.put("9.x", "1.7");
        pdfVersions.put("10.x", "1.7");
        pdfVersions.put("11.x.PDFA-1b", "1.7");

        Map<String, String> pdfExtensionVersions = new HashMap<>();
        pdfExtensionVersions.put("9.x", "1.7 Adobe Extension Level 3");
        pdfExtensionVersions.put("10.x", "1.7 Adobe Extension Level 8");
        pdfExtensionVersions.put("11.x.PDFA-1b", "1.7 Adobe Extension Level 8");

        for (Map.Entry<String, String> e : dcFormat.entrySet()) {
            String fName = "testPDF_Version." + e.getKey() + ".pdf";

            XMLResult r = getXML(fName);
            boolean foundDC = false;
            String[] vals = r.metadata.getValues("dc:format");
            for (String v : vals) {
                if (v.equals(e.getValue())) {
                    foundDC = true;
                    break;
                }
            }
            assertTrue(foundDC, "dc:format ::" + e.getValue());
            String extensionVersionTruth = pdfExtensionVersions.get(e.getKey());
            if (extensionVersionTruth != null) {
                assertEquals(extensionVersionTruth, r.metadata.get("pdf:PDFExtensionVersion"),
                        "pdf:PDFExtensionVersion :: " + extensionVersionTruth);
            }
            assertEquals(pdfVersions.get(e.getKey()),
                    r.metadata.get("pdf:PDFVersion"), "pdf:PDFVersion");
        }
        //now test full 11.x
        XMLResult r = getXML("testPDF_Version.11.x.PDFA-1b.pdf");
        Set<String> versions = new HashSet<>(Arrays.asList(r.metadata.getValues("dc:format")));

        for (String hit : new String[]{"application/pdf; version=1.7",
                "application/pdf; version=\"1.7 Adobe Extension Level 8\""}) {
            assertTrue(versions.contains(hit), hit);
        }

        assertEquals(r.metadata.get("pdfaid:conformance"), "B", "pdfaid:conformance");
        assertEquals(r.metadata.get("pdfaid:part"), "1", "pdfaid:part");
    }
Test to ensure that Links are extracted from the text
<p/>
Note - the PDF contains the text "This is a hyperlink" which
a hyperlink annotation, linking to the tika site, on it. This
test will need updating when we're able to apply the annotation
to the text itself, rather than following on afterwards as now
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-pdf-module/src/test/java/org/apache/tika/parser/pdf/PDFParserTest.java