XPathExpressionFactory { public static XPathExpression createXPathExpression(String expression) throws IllegalStateException, XPathParseException { return createXPathExpression(expression, Collections.<String, String> emptyMap()); }  static XPathExpression createXPathExpression(String expression); static XPathExpression createXPathExpression(String expression, Map<String, String> namespaces);  }
@Test public void testCreateXPathExpression() throws Exception { XPathExpression expression = XPathExpressionFactory.createXPathExpression("/root"); Assert.assertNotNull("No expression returned", expression); }
@Test public void testCreateEmptyXPathExpression() throws Exception { try { XPathExpressionFactory.createXPathExpression(""); Assert.fail("Should have thrown an Exception"); } catch (IllegalArgumentException ex) { } }