### Question:
XmlDescriptorParser implements DescriptorParser { public PluginInformation getPluginInformation() { return createPluginInformation(getDocument().getRootElement().element("plugin-info")); } XmlDescriptorParser(final Document source, final String... applicationKeys);  XmlDescriptorParser(final InputStream source, final String... applicationKeys); Plugin configurePlugin(final ModuleDescriptorFactory moduleDescriptorFactory, final Plugin plugin); String getKey(); int getPluginsVersion(); PluginInformation getPluginInformation(); boolean isSystemPlugin();  }### Answer:
@Test public void testPluginsApplicationVersionMinMax() { XmlDescriptorParser parser = parse(null, "<maera-plugin key='foo'>", " <plugin-info>", " <application-version min='3' max='4' />", " </plugin-info>", "</maera-plugin>"); assertEquals(3, (int) parser.getPluginInformation().getMinVersion()); assertEquals(4, (int) parser.getPluginInformation().getMaxVersion()); }
@Test public void testPluginsApplicationVersionMinMaxWithOnlyMax() { XmlDescriptorParser parser = parse(null, "<maera-plugin key='foo'>", " <plugin-info>", " <application-version max='3' />", " </plugin-info>", "</maera-plugin>"); assertEquals(3, (int) parser.getPluginInformation().getMaxVersion()); assertEquals(0, (int) parser.getPluginInformation().getMinVersion()); }
@Test public void testPluginsApplicationVersionMinMaxWithOnlyMin() { XmlDescriptorParser parser = parse(null, "<maera-plugin key='foo'>", " <plugin-info>", " <application-version min='3' />", " </plugin-info>", "</maera-plugin>"); assertEquals(3, (int) parser.getPluginInformation().getMinVersion()); assertEquals(0, (int) parser.getPluginInformation().getMaxVersion()); }