@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.");
    }
}