### Question:
ValidationParser { InputStream getInputStream(final String path) throws IOException { final List<URL> urls = Collections.list(loader.getResources(path)); Exceptions.raiseIf(urls.stream().distinct().count() > 1, ValidationException::new, "More than one %s is found in the classpath", path); return urls.isEmpty() ? null : urls.get(0).openStream(); } ValidationParser(ClassLoader loader); BootstrapConfiguration processValidationConfig(final String file,
        final ConfigurationImpl targetConfig); InputStream open(String mappingFileName);  }### Answer:
@Test public void testGetInputStream() throws IOException { assertNotNull(validationParser.getInputStream("sample-validation.xml")); final Enumeration<URL> resources = Reflection.loaderFromClassOrThread(ValidationParser.class).getResources("META-INF/MANIFEST.MF"); assumeTrue(resources.hasMoreElements()); resources.nextElement(); assumeTrue(resources.hasMoreElements()); }
@Test public void testGetNonUniqueInputStream() throws IOException { thrown.expect(ValidationException.class); thrown.expectMessage("More than "); validationParser.getInputStream("META-INF/MANIFEST.MF"); }