### Question:
XmlDynamicPluginFactory implements PluginFactory { @Deprecated public Plugin create(final DeploymentUnit deploymentUnit, final ModuleDescriptorFactory moduleDescriptorFactory) throws PluginParseException { return create(new XmlPluginArtifact(deploymentUnit.getPath()), moduleDescriptorFactory); } @Deprecated  XmlDynamicPluginFactory();  XmlDynamicPluginFactory(final String applicationKey);  XmlDynamicPluginFactory(final Set<String> applicationKeys); @Deprecated Plugin create(final DeploymentUnit deploymentUnit, final ModuleDescriptorFactory moduleDescriptorFactory); Plugin create(final PluginArtifact pluginArtifact, final ModuleDescriptorFactory moduleDescriptorFactory); String canCreate(final PluginArtifact pluginArtifact);  }### Answer:
@Test(expected = PluginParseException.class) public void testCreateBadXml() { XmlDynamicPluginFactory factory = new XmlDynamicPluginFactory("foo"); Mock mockModuleDescriptorFactory = new Mock(ModuleDescriptorFactory.class); Mock mockArtifact = new Mock(PluginArtifact.class); mockArtifact.expectAndReturn("toFile", new File("sadfasdf")); factory.create((PluginArtifact) mockArtifact.proxy(), (ModuleDescriptorFactory) mockModuleDescriptorFactory.proxy()); }