String namespace = "urn:operation-selector-test:1.0";
String namespace2 = "urn:operation-selector-test:2.0";
String operation = "invoke";
String fullname = "{" + namespace2 + "}" + operation;
StaticOperationSelectorModel model = new V1StaticOperationSelectorModel(SwitchYardNamespace.DEFAULT.uri());
model.setOperationName(operation);
OperationSelector<String> selector = new MyOperationSelector(model);
QName operationQName = selector.selectOperation(null);
Assert.assertEquals(XMLConstants.NULL_NS_URI, operationQName.getNamespaceURI());
Assert.assertEquals(operation, operationQName.getLocalPart());
selector.setDefaultNamespace(namespace);
operationQName = selector.selectOperation(null);
Assert.assertEquals(namespace, operationQName.getNamespaceURI());
Assert.assertEquals(operation, operationQName.getLocalPart());
model.setOperationName(fullname);
selector = new MyOperationSelector(model);
selector.setDefaultNamespace(namespace);
operationQName = selector.selectOperation(null);
Assert.assertEquals(namespace2, operationQName.getNamespaceURI());
Assert.assertEquals(operation, operationQName.getLocalPart());