GenericXMLHandler implements Cloneable { public String GetElementText(String xPathExpression) { try { String result = XPathFactory.newInstance().newXPath().evaluate(xPathExpression, dDoc); if (StringUtils.isNotEmpty(result)) { return result; } return ""; } catch (Exception ex) { LOG.error("Error in handler: " + ex.getMessage(), ex); return ""; } } GenericXMLHandler();  GenericXMLHandler(File xmlFile);  GenericXMLHandler(String xmlFile); void SetElementText(String xPathExpression, String value); void SetElementAttribute(String xPathExpression, String attribute, String value); String GetElementText(String xPathExpression); String GetElementAttr(String xPathExpression); ArrayList<String> GetElementList(String xPathExpression); boolean xPathExists(String xpathExpr); String toString(); void Save(); boolean isXMLValid(); Object clone(); String getParentPath(String xpath); String getCurrentPath(String xpath, int node); String getChildNode(String xpath); String getCurrentNamespace(String xpath); void setNamespace(String name, String value);  }
@Test public void testGetElementText_1() throws Exception { GenericXMLHandler fixture = new GenericXMLHandler(new File("")); fixture.namespaces = new HashMap(); fixture.xml = ""; fixture.xmlDocument = new Document(); String xPathExpression = ""; String result = fixture.GetElementText(xPathExpression); assertNotNull(result); }
@Test public void testGetElementText_2() throws Exception { GenericXMLHandler fixture = new GenericXMLHandler(new File("")); fixture.namespaces = new HashMap(); fixture.xml = ""; fixture.xmlDocument = new Document(); String xPathExpression = ""; String result = fixture.GetElementText(xPathExpression); assertNotNull(result); }
@Test public void testGetElementText_3() throws Exception { GenericXMLHandler fixture = new GenericXMLHandler(new File("")); fixture.namespaces = new HashMap(); fixture.xml = ""; fixture.xmlDocument = new Document(); String xPathExpression = ""; String result = fixture.GetElementText(xPathExpression); assertNotNull(result); }