@Test
public void testXPathCache() throws JaxenException
{
XPathExpressionEvaluator xPathExpressionEvaluator = new XPathExpressionEvaluator();
XPath xPathDOM1 = xPathExpressionEvaluator.getXPath(EXPRESSION, new DOMDocument());
assertTrue(xPathDOM1 instanceof DOMXPath);
XPath xPathDOM2 = xPathExpressionEvaluator.getXPath(EXPRESSION, new DOMDocument());
assertTrue(xPathDOM2 == xPathDOM1);
XPath xPathDom4j3 = xPathExpressionEvaluator.getXPath(EXPRESSION, new DefaultDocument());
assertTrue(xPathDom4j3 instanceof Dom4jXPath);
assertTrue(xPathDOM1 != xPathDom4j3);
XPath xPathDOM3 = xPathExpressionEvaluator.getXPath(OTHER_EXPRESSION, new DOMDocument());
assertTrue(xPathDOM1 != xPathDOM3);
}