PomWrapper { @Override public String toString() { return groupId + ":" + artifactId + ":" + version; } PomWrapper(Document dom);  PomWrapper(File file); Document getDom(); void setDom(Document dom); String selectValue(String xpath); String selectValue(Node node, String xpath); Element selectElement(String xpath); Element selectElement(Node node, String xpath); List<Element> selectElements(String... paths); List<Element> selectElements(Node node, String... paths); Element selectOrCreateElement(String xpath); Element clear(String xpath); Map<String,String> getProperties(); String getProperty(String name); void setProperty(String name, String value); void deleteProperty(String name); String resolveProperties(String src); Artifact getGAV(); Artifact getParent(); @Override String toString(); List<Element> filterByGroupAndArtifact(List<Element> elements, String withGroupId, String withArtifactId);  }
@Test public void testToString() throws Exception { PomWrapper wrapper1 = new PomWrapper(ParseUtil.parseFromClasspath("PomWrapper1.xml")); assertEquals("com.example.pom:wrapper1:0.0.0-SNAPSHOT", wrapper1.toString()); PomWrapper wrapper2 = new PomWrapper(ParseUtil.parseFromClasspath("PomWrapper4.xml")); assertEquals("com.example.pom:wrapper4:0.0.0-SNAPSHOT", wrapper2.toString()); }