public void test_05() throws IOException, SAXException {
Smooks smooks = new Smooks();
smooks.setFilterSettings(FilterSettings.DEFAULT_SAX);
smooks.addVisitor(new XPathVisitor(), "item[@code = '8655']/units[text() = 1]");
try {
smooks.filterSource(new StreamSource(getClass().getResourceAsStream("order.xml")));
fail("Expected SmooksConfigurationException");
} catch(SmooksConfigurationException e) {
assertEquals("Unsupported selector 'item[@code = '8655']/units[text() = 1]' on resource 'Target Profile: [[org.milyn.profile.Profile#default_profile]], Selector: [item[@code = '8655']/units[text() = 1]], Selector Namespace URI: [null], Resource: [org.milyn.cdr.xpath.XPathVisitor], Num Params: [0]'. The 'text()' XPath token is only supported on SAX Visitor implementations that implement the org.milyn.delivery.sax.SAXVisitAfter interface only. Class 'org.milyn.cdr.xpath.XPathVisitor' implements other SAX Visitor interfaces.", e.getMessage());