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 shouldParseValidVersionOfPluginBundleXML() throws Exception {
        InputStream pluginXml = getClass().getClassLoader().getResourceAsStream("defaultFiles/valid-gocd-bundle.xml");
        final GoPluginBundleDescriptor bundle = parseXML(pluginXml, "/tmp/a.jar", new File("/tmp/"), true);
        assertEquals(2, bundle.descriptors().size());

        final GoPluginDescriptor pluginDescriptor1 = bundle.descriptors().get(0);
        assertPluginDescriptor(pluginDescriptor1, "testplugin.multipluginbundle.plugin1",
            "Plugin 1", "1.0.0", "19.5",
            "Example plugin 1", "GoCD Team", "https://gocd.org", List.of("Linux", "Windows"),
            List.of("cd.go.contrib.package1.TaskExtension", "cd.go.contrib.package1.ElasticAgentExtension"));

        final GoPluginDescriptor pluginDescriptor2 = bundle.descriptors().get(1);
        assertPluginDescriptor(pluginDescriptor2, "testplugin.multipluginbundle.plugin2",
            "Plugin 2", "2.0.0", "19.5",
            "Example plugin 2", "Some other org", "www.example.com", List.of("Linux"),
            List.of("cd.go.contrib.package2.TaskExtension", "cd.go.contrib.package2.AnalyticsExtension"));
    }