XmlXPathRetrieve extends TransformationUtility<XmlXPathRetrieve> { public XmlXPathRetrieve setXPathExpression(String xpathExpressionString) { setXPathExpression(xpathExpressionString, returnDataType); return this; } XmlXPathRetrieve();  XmlXPathRetrieve(String xpathExpressionString);  XmlXPathRetrieve(String xpathExpressionString, QName returnDataType); XmlXPathRetrieve setXPathExpression(String xpathExpressionString); XmlXPathRetrieve setXPathExpression(String xpathExpressionString, QName returnDataType); String getXPathExpressionString(); QName getReturnDataType(); void setReturnDataType(QName returnDataType); @Override String getDescription();  }
@Test public void invalidXPathExpressionTest() { final String XPATH_EXPRESSION = "@#$123456"; try { new XmlXPathRetrieve().setXPathExpression(XPATH_EXPRESSION); fail("Exception was supposed to be thrown but was not"); } catch (TransformationDefinitionException e) { assertEquals(e.getMessage(), "XPath expression '@#$123456' didn't compile correctly."); } }