public static GoPluginBundleDescriptor parseXML(InputStream pluginXml,
                                                    BundleOrPluginFileDetails bundleOrPluginJarFile) throws IOException, JAXBException, XMLStreamException, SAXException {
        return parseXML(pluginXml, bundleOrPluginJarFile.file().getAbsolutePath(), bundleOrPluginJarFile.extractionLocation(), bundleOrPluginJarFile.isBundledPlugin());
    }
@Test
    void shouldParseValidVersionOfPluginXML() throws Exception {
        InputStream pluginXml = getClass().getClassLoader().getResourceAsStream("defaultFiles/valid-plugin.xml");
        final GoPluginBundleDescriptor bundleDescriptor = GoPluginDescriptorParser.parseXML(pluginXml, "/tmp/a.jar", new File("/tmp/"), true);

        assertEquals(1, bundleDescriptor.descriptors().size());

        final GoPluginDescriptor pluginDescriptor = bundleDescriptor.descriptors().get(0);
        assertPluginDescriptor(pluginDescriptor, "testplugin.descriptorValidator", "Plugin Descriptor Validator",
            "1.0.1", "17.12", "Validates its own plugin descriptor",
            "GoCD Team", "https://gocd.org", List.of("Linux", "Windows"));

        assertTrue(pluginDescriptor.extensionClasses().isEmpty());
    }