void () { final Artifact a = addArtifact(root().dir("lib").file(createFile("a.txt"))); final ElementToStringCollector processor = new ElementToStringCollector(true); ArtifactUtil.processElementsByRelativePath(a.getRootElement(), "lib/a.txt", getContext(), PlainArtifactType.getInstance(), PackagingElementPath.EMPTY, processor); assertEquals("/lib/file:" + getProjectBasePath() + "/a.txt\n", processor.getOutput()); }