public void testXPath() throws Exception {
String expression = "/Message/Operation";
String expressionAttribute = "/Message/Operation/@name";
String content = "<Message><Operation name=\"xpathOperationFromAttribute\">xpathOperation</Operation></Message>";
XPathOperationSelectorModel model = new V1XPathOperationSelectorModel(SwitchYardNamespace.DEFAULT.uri());
model.setExpression(expression);
OperationSelector<String> selector = new MyOperationSelector(model);
QName operationQName = selector.selectOperation(content);
Assert.assertEquals("xpathOperation", operationQName.getLocalPart());
model.setExpression(expressionAttribute);
selector = new MyOperationSelector(model);
operationQName = selector.selectOperation(content);
Assert.assertEquals("xpathOperationFromAttribute", operationQName.getLocalPart());
}