Validator { public static void validate(File[] manifestFiles) throws IOException { final String msg = "Cannot create document from manifest XML file"; Document[] manifests = new Document[manifestFiles.length]; try { for (int i = 0; i < manifestFiles.length; i++) { manifests[i] = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(manifestFiles[i]); } } catch (SAXException | ParserConfigurationException e) { throw new IOException(MessageFormat.format("{0}: {1}", msg, e.getMessage())); } try { validateOrbitReference(manifests); validateAdjacency(manifests); } catch (PDUStitchingException e) { throw new IOException(e.getMessage()); } }  static void validate(File[] manifestFiles);  }
@Test public void testValidate() throws ParserConfigurationException, SAXException, URISyntaxException { final File[] slstrFiles = TestUtils.getSlstrFiles(); try { Validator.validate(slstrFiles); } catch (IOException e) { fail("No exception expected: " + e.getMessage()); } }