### Question:
DefaultPluginArtifactFactory implements PluginArtifactFactory { public PluginArtifact create(URI artifactUri) { PluginArtifact artifact = null; String protocol = artifactUri.getScheme(); if ("file".equalsIgnoreCase(protocol)) { File artifactFile = new File(artifactUri); String file = artifactFile.getName(); if (file.endsWith(".jar")) artifact = new JarPluginArtifact(artifactFile); else if (file.endsWith(".xml")) artifact = new XmlPluginArtifact(artifactFile); } if (artifact == null) throw new IllegalArgumentException("The artifact URI " + artifactUri + " is not a valid plugin artifact"); return artifact; }  PluginArtifact create(URI artifactUri);  }### Answer:
@Test public void testCreate() throws IOException { doCreationTestInDirectory(testDir); }