### Question:
XmlUtilsTask implements Task { public String xpathString(@InjectVariable("workDir") String workDir, String file, String expression) throws Exception { return delegate(workDir).xpathString(file, expression); }  String xpathString(@InjectVariable("workDir") String workDir, String file, String expression); List<String> xpathListOfStrings(@InjectVariable("workDir") String workDir, String file, String expression); Map<String, String> mavenGav(@InjectVariable("workDir") String workDir, String file); @Override void execute(Context ctx);  }### Answer:
@Test public void testXpathString() throws Exception { String file = "test.xml"; URL src = ClassLoader.getSystemResource(file); String workDir = Paths.get(src.toURI()).getParent().toAbsolutePath().toString(); XmlUtilsTask t = new XmlUtilsTask(); String value = t.xpathString(workDir, file, "/project/version/text()"); assertEquals("1.52.1-SNAPSHOT", value); List<String> l = t.xpathListOfStrings(workDir, file, "/project/*[local-name()='groupId' or local-name()='artifactId' or local-name()='version']/text()"); assertEquals(3, l.size()); assertTrue(l.contains("com.walmartlabs.concord")); assertTrue(l.contains("parent")); assertTrue(l.contains("1.52.1-SNAPSHOT")); }