}
@Test
public void testGetActionFromExtensible() {
Map<QName, Object> attributes = new HashMap<QName, Object>();
Extensible ext = control.createMock(Extensible.class);
EasyMock.expect(ext.getExtensionAttributes()).andReturn(attributes).anyTimes();
attributes.put(WSA_ACTION_QNAME, "urn:foo:test:2");
EasyMock.expect(ext.getExtensionAttribute(JAXWSAConstants.WSAW_ACTION_QNAME)).
andReturn("urn:foo:test:1");
control.replay();
String action = InternalContextUtils.getAction(ext);
assertEquals("urn:foo:test:1", action);
control.reset();
attributes.clear();
EasyMock.expect(ext.getExtensionAttributes()).andReturn(attributes).anyTimes();
EasyMock.expect(ext.getExtensionAttribute(JAXWSAConstants.WSAW_ACTION_QNAME)).
andReturn(null);
attributes.put(WSA_ACTION_QNAME, "urn:foo:test:2");
control.replay();
action = InternalContextUtils.getAction(ext);
assertEquals("urn:foo:test:2", action);
control.reset();
attributes.clear();
EasyMock.expect(ext.getExtensionAttributes()).andReturn(attributes).anyTimes();
EasyMock.expect(ext.getExtensionAttribute(JAXWSAConstants.WSAW_ACTION_QNAME)).
andReturn(null);
attributes.put(OLD_WSDL_WSA_ACTION_QNAME, "urn:foo:test:3");
control.replay();
action = InternalContextUtils.getAction(ext);
assertEquals("urn:foo:test:3", action);
control.reset();
attributes.clear();
EasyMock.expect(ext.getExtensionAttributes()).andReturn(attributes).anyTimes();
EasyMock.expect(ext.getExtensionAttribute(JAXWSAConstants.WSAW_ACTION_QNAME)).
andReturn(null);
control.replay();
action = InternalContextUtils.getAction(ext);
assertEquals(null, action);