cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject svn commit: r1307604 [2/2] - in /cxf/trunk/rt/ws/rm/src: main/java/org/apache/cxf/ws/rm/ main/java/org/apache/cxf/ws/rm/persistence/ main/java/org/apache/cxf/ws/rm/persistence/jdbc/ main/java/org/apache/cxf/ws/rm/soap/ test/java/org/apache/cxf/ws/rm/ t...
Date Fri, 30 Mar 2012 20:50:23 GMT
Modified: cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/ProxyTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/ProxyTest.java?rev=1307604&r1=1307603&r2=1307604&view=diff
==============================================================================
--- cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/ProxyTest.java (original)
+++ cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/ProxyTest.java Fri Mar 30 20:50:22 2012
@@ -108,12 +108,12 @@ public class ProxyTest extends Assert {
     @Test
     public void testAcknowledge() throws NoSuchMethodException, RMException {
         Method m = Proxy.class.getDeclaredMethod("invoke", 
-            new Class[] {OperationInfo.class, Object[].class, Map.class});
+            new Class[] {OperationInfo.class, ProtocolVariation.class, Object[].class, Map.class});
         Proxy proxy = EasyMock.createMockBuilder(Proxy.class)
             .addMockedMethod(m).createMock(control);
         proxy.setReliableEndpoint(rme);
-        EasyMock.expect(rme.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408).anyTimes();
         DestinationSequence ds = control.createMock(DestinationSequence.class);
+        EasyMock.expect(ds.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408).anyTimes();
         EndpointReferenceType acksToEPR = control.createMock(EndpointReferenceType.class);
         EasyMock.expect(ds.getAcksTo()).andReturn(acksToEPR).anyTimes();
         AttributedURIType acksToURI = control.createMock(AttributedURIType.class);
@@ -121,7 +121,7 @@ public class ProxyTest extends Assert {
         String acksToAddress = "acksTo";
         EasyMock.expect(acksToURI.getValue()).andReturn(acksToAddress).anyTimes();
         Endpoint endpoint = control.createMock(Endpoint.class);
-        EasyMock.expect(rme.getEndpoint()).andReturn(endpoint).anyTimes();
+        EasyMock.expect(rme.getEndpoint(ProtocolVariation.RM10WSA200408)).andReturn(endpoint).anyTimes();
         EndpointInfo epi = control.createMock(EndpointInfo.class);
         EasyMock.expect(endpoint.getEndpointInfo()).andReturn(epi).anyTimes();
         ServiceInfo si = control.createMock(ServiceInfo.class);
@@ -139,11 +139,12 @@ public class ProxyTest extends Assert {
     @Test
     public void testLastMessage() throws NoSuchMethodException, RMException {
         Method m = Proxy.class.getDeclaredMethod("invoke", 
-            new Class[] {OperationInfo.class, Object[].class, Map.class});
+            new Class[] {OperationInfo.class, ProtocolVariation.class, Object[].class, Map.class});
         Proxy proxy = EasyMock.createMockBuilder(Proxy.class)
             .addMockedMethod(m).createMock(control);
         proxy.setReliableEndpoint(rme);
         SourceSequence ss = control.createMock(SourceSequence.class);
+        EasyMock.expect(ss.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408).anyTimes();
         EasyMock.expect(ss.getTarget()).andReturn(null).anyTimes();
         control.replay();
         proxy.lastMessage(ss);
@@ -160,8 +161,9 @@ public class ProxyTest extends Assert {
         control.reset();
         target = RMUtils.createReference("http://localhost:9000/greeterPort");
         EasyMock.expect(ss.getTarget()).andReturn(target).anyTimes();
+        EasyMock.expect(ss.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408).anyTimes();
         Endpoint endpoint = control.createMock(Endpoint.class);
-        EasyMock.expect(rme.getEndpoint()).andReturn(endpoint).anyTimes();
+        EasyMock.expect(rme.getEndpoint(ProtocolVariation.RM10WSA200408)).andReturn(endpoint).anyTimes();
         EndpointInfo epi = control.createMock(EndpointInfo.class);
         EasyMock.expect(endpoint.getEndpointInfo()).andReturn(epi).anyTimes();
         ServiceInfo si = control.createMock(ServiceInfo.class);
@@ -171,7 +173,6 @@ public class ProxyTest extends Assert {
         OperationInfo oi = control.createMock(OperationInfo.class);
         EasyMock.expect(ii.getOperation(RM10Constants.CLOSE_SEQUENCE_QNAME)).andReturn(oi).anyTimes();
         expectInvokeWithContext(proxy, oi, null);
-        EasyMock.expect(rme.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408).anyTimes();
         control.replay();
         
         proxy.lastMessage(ss);
@@ -181,13 +182,12 @@ public class ProxyTest extends Assert {
     @Test    
     public void testTerminate() throws NoSuchMethodException, RMException {
         Method m = Proxy.class.getDeclaredMethod("invoke", 
-            new Class[] {OperationInfo.class, Object[].class, Map.class});
+            new Class[] {OperationInfo.class, ProtocolVariation.class, Object[].class, Map.class});
         Proxy proxy = EasyMock.createMockBuilder(Proxy.class)
             .addMockedMethod(m).createMock(control);
         proxy.setReliableEndpoint(rme);        
-        EasyMock.expect(rme.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408).anyTimes();
         Endpoint endpoint = control.createMock(Endpoint.class);
-        EasyMock.expect(rme.getEndpoint()).andReturn(endpoint).anyTimes();
+        EasyMock.expect(rme.getEndpoint(ProtocolVariation.RM10WSA200408)).andReturn(endpoint).anyTimes();
         EndpointInfo epi = control.createMock(EndpointInfo.class);
         EasyMock.expect(endpoint.getEndpointInfo()).andReturn(epi).anyTimes();
         ServiceInfo si = control.createMock(ServiceInfo.class);
@@ -199,6 +199,7 @@ public class ProxyTest extends Assert {
         SourceSequence ss = control.createMock(SourceSequence.class);
         Identifier id = control.createMock(Identifier.class);
         EasyMock.expect(ss.getIdentifier()).andReturn(id).anyTimes();
+        EasyMock.expect(ss.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408).anyTimes();
         expectInvoke(proxy, oi, null);
         control.replay();
         proxy.terminate(ss);
@@ -207,13 +208,12 @@ public class ProxyTest extends Assert {
     @Test
     public void testCreateSequenceResponse() throws NoSuchMethodException, RMException {
         Method m = Proxy.class.getDeclaredMethod("invoke", 
-            new Class[] {OperationInfo.class, Object[].class, Map.class});
+            new Class[] {OperationInfo.class, ProtocolVariation.class, Object[].class, Map.class});
         Proxy proxy = EasyMock.createMockBuilder(Proxy.class)
             .addMockedMethod(m).createMock(control);
         proxy.setReliableEndpoint(rme);
-        EasyMock.expect(rme.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408).anyTimes();
         Endpoint endpoint = control.createMock(Endpoint.class);
-        EasyMock.expect(rme.getEndpoint()).andReturn(endpoint).anyTimes();
+        EasyMock.expect(rme.getEndpoint(ProtocolVariation.RM10WSA200408)).andReturn(endpoint).anyTimes();
         EndpointInfo epi = control.createMock(EndpointInfo.class);
         EasyMock.expect(endpoint.getEndpointInfo()).andReturn(epi).anyTimes();
         ServiceInfo si = control.createMock(ServiceInfo.class);
@@ -227,7 +227,7 @@ public class ProxyTest extends Assert {
             control.createMock(org.apache.cxf.ws.rm.v200702.CreateSequenceResponseType.class);
         expectInvoke(proxy, oi, null);
         control.replay();
-        proxy.createSequenceResponse(csr);
+        proxy.createSequenceResponse(csr, ProtocolVariation.RM10WSA200408);
     }
     
     @Test
@@ -243,21 +243,20 @@ public class ProxyTest extends Assert {
     @Test
     public void testInvoke() throws Exception {        
         Method m = Proxy.class.getDeclaredMethod("createClient", 
-            new Class[] {Bus.class, Endpoint.class, Conduit.class, 
+            new Class[] {Bus.class, Endpoint.class, ProtocolVariation.class, Conduit.class, 
                          org.apache.cxf.ws.addressing.EndpointReferenceType.class});
         Proxy proxy = EasyMock.createMockBuilder(Proxy.class)
             .addMockedMethod(m).createMock(control);
         proxy.setReliableEndpoint(rme);
-        EasyMock.expect(rme.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408).anyTimes();
 
         RMManager manager = control.createMock(RMManager.class);
         EasyMock.expect(rme.getManager()).andReturn(manager).anyTimes();
         Bus bus = control.createMock(Bus.class);
         EasyMock.expect(manager.getBus()).andReturn(bus).anyTimes();
         Endpoint endpoint = control.createMock(Endpoint.class);
-        EasyMock.expect(rme.getEndpoint()).andReturn(endpoint).anyTimes();
+        EasyMock.expect(rme.getEndpoint(ProtocolVariation.RM10WSA200408)).andReturn(endpoint).anyTimes();
         BindingInfo bi = control.createMock(BindingInfo.class);
-        EasyMock.expect(rme.getBindingInfo()).andReturn(bi).anyTimes();
+        EasyMock.expect(rme.getBindingInfo(ProtocolVariation.RM10WSA200408)).andReturn(bi).anyTimes();
 
         Conduit conduit = control.createMock(Conduit.class);
         EasyMock.expect(rme.getConduit()).andReturn(conduit).anyTimes();
@@ -269,14 +268,15 @@ public class ProxyTest extends Assert {
         BindingOperationInfo boi = control.createMock(BindingOperationInfo.class);
         EasyMock.expect(bi.getOperation(oi)).andReturn(boi).anyTimes();
         Client client = control.createMock(Client.class);
-        EasyMock.expect(proxy.createClient(bus, endpoint, conduit, replyTo)).andReturn(client).anyTimes();  
+        EasyMock.expect(proxy.createClient(bus, endpoint, ProtocolVariation.RM10WSA200408, conduit, replyTo))
+            .andReturn(client).anyTimes();  
         Object[] args = new Object[] {};
         Map<String, Object> context = new HashMap<String, Object>();
         Object[] results = new Object[] {"a", "b", "c"};
         EasyMock.expect(client.invoke(boi, args, context)).andReturn(results).anyTimes();        
         
         control.replay();
-        assertEquals("a", proxy.invoke(oi, args, context));
+        assertEquals("a", proxy.invoke(oi, ProtocolVariation.RM10WSA200408, args, context));
     }
     
     @Test 
@@ -287,9 +287,8 @@ public class ProxyTest extends Assert {
         Conduit conduit = control.createMock(Conduit.class);
         org.apache.cxf.ws.addressing.EndpointReferenceType address = 
             control.createMock(org.apache.cxf.ws.addressing.EndpointReferenceType.class);
-        EasyMock.expect(rme.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408).anyTimes();
         control.replay();
-        assertNotNull(proxy.createClient(bus, endpoint, conduit, address));
+        assertNotNull(proxy.createClient(bus, endpoint, ProtocolVariation.RM10WSA200408, conduit, address));
     }
     
     @Test 
@@ -309,11 +308,10 @@ public class ProxyTest extends Assert {
     
     private void testCreateSequence(boolean isServer) throws NoSuchMethodException, RMException {
         Method m = Proxy.class.getDeclaredMethod("invoke", 
-            new Class[] {OperationInfo.class, Object[].class, Map.class});
+            new Class[] {OperationInfo.class, ProtocolVariation.class, Object[].class, Map.class});
         Proxy proxy = EasyMock.createMockBuilder(Proxy.class)
             .addMockedMethod(m).createMock(control);
         proxy.setReliableEndpoint(rme);
-        EasyMock.expect(rme.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408).anyTimes();
         
         RMManager manager = control.createMock(RMManager.class);
         EasyMock.expect(rme.getManager()).andReturn(manager).anyTimes();
@@ -331,7 +329,7 @@ public class ProxyTest extends Assert {
         EasyMock.expect(source.generateSequenceIdentifier()).andReturn(offeredId).anyTimes();
              
         Endpoint endpoint = control.createMock(Endpoint.class);
-        EasyMock.expect(rme.getEndpoint()).andReturn(endpoint).anyTimes();
+        EasyMock.expect(rme.getEndpoint(ProtocolVariation.RM10WSA200408)).andReturn(endpoint).anyTimes();
         EndpointInfo epi = control.createMock(EndpointInfo.class);
         EasyMock.expect(endpoint.getEndpointInfo()).andReturn(epi).anyTimes();
         ServiceInfo si = control.createMock(ServiceInfo.class);
@@ -360,22 +358,26 @@ public class ProxyTest extends Assert {
         RelatesToType relatesTo = control.createMock(RelatesToType.class);
         control.replay();
         if (isServer) {
-            assertNull(proxy.createSequence(defaultAcksTo, relatesTo, isServer));
+            assertNull(proxy.createSequence(defaultAcksTo, relatesTo, isServer, 
+                                            ProtocolVariation.RM10WSA200408));
         } else {
-            assertNotNull(proxy.createSequence(defaultAcksTo, relatesTo, isServer));
+            assertNotNull(proxy.createSequence(defaultAcksTo, relatesTo, isServer, 
+                                               ProtocolVariation.RM10WSA200408));
         }
     }
     
     @SuppressWarnings("unchecked")
     private void expectInvoke(Proxy proxy, OperationInfo oi, Object expectedReturn) throws RMException {
-        EasyMock.expect(proxy.invoke(EasyMock.same(oi), EasyMock.isA(Object[].class), 
+        EasyMock.expect(proxy.invoke(EasyMock.same(oi), EasyMock.isA(ProtocolVariation.class), 
+                                     EasyMock.isA(Object[].class), 
             (Map<String, Object>)EasyMock.isNull())).andReturn(expectedReturn).anyTimes();
     }
     
     @SuppressWarnings("unchecked")
     private void expectInvokeWithContext(Proxy proxy, OperationInfo oi, Object expectedReturn) 
         throws RMException {
-        EasyMock.expect(proxy.invoke(EasyMock.same(oi), EasyMock.isA(Object[].class), 
+        EasyMock.expect(proxy.invoke(EasyMock.same(oi), EasyMock.isA(ProtocolVariation.class),
+                                     EasyMock.isA(Object[].class), 
             EasyMock.isA(Map.class))).andReturn(expectedReturn).anyTimes();
     }
 }

Modified: cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMEndpointTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMEndpointTest.java?rev=1307604&r1=1307603&r2=1307604&view=diff
==============================================================================
--- cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMEndpointTest.java (original)
+++ cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMEndpointTest.java Fri Mar 30 20:50:22 2012
@@ -72,7 +72,7 @@ public class RMEndpointTest extends Asse
         control = EasyMock.createNiceControl();
         manager = control.createMock(RMManager.class);
         ae = control.createMock(Endpoint.class);
-        rme = new RMEndpoint(manager, ae, ProtocolVariation.RM10WSA200408);
+        rme = new RMEndpoint(manager, ae);
     }
 
     @After
@@ -84,8 +84,8 @@ public class RMEndpointTest extends Asse
     public void testConstructor() {
         control.replay();
         assertNotNull(rme);
-        assertNull(rme.getEndpoint());
-        assertNull(rme.getService());
+        assertNull(rme.getEndpoint(ProtocolVariation.RM10WSA200408));
+        assertNull(rme.getService(ProtocolVariation.RM10WSA200408));
         assertNull(rme.getConduit());
         assertNull(rme.getReplyTo());
     }
@@ -134,16 +134,16 @@ public class RMEndpointTest extends Asse
 
     @Test
     public void testInitialise() throws NoSuchMethodException {
-        Method m1 = RMEndpoint.class.getDeclaredMethod("createService", new Class[] {});
+        Method m1 = RMEndpoint.class.getDeclaredMethod("createServices", new Class[] {});
         Method m2 = RMEndpoint.class
-            .getDeclaredMethod("createEndpoint", new Class[] {org.apache.cxf.transport.Destination.class});
+            .getDeclaredMethod("createEndpoints", new Class[] {org.apache.cxf.transport.Destination.class});
         Method m3 = RMEndpoint.class.getDeclaredMethod("setPolicies", new Class[] {});
 
         rme = EasyMock.createMockBuilder(RMEndpoint.class)
             .addMockedMethods(m1, m2 , m3).createMock(control);
-        rme.createService();
+        rme.createServices();
         EasyMock.expectLastCall();
-        rme.createEndpoint(null);
+        rme.createEndpoints(null);
         EasyMock.expectLastCall();
         rme.setPolicies();
         EasyMock.expectLastCall();
@@ -160,8 +160,8 @@ public class RMEndpointTest extends Asse
         Service as = control.createMock(Service.class);
         EasyMock.expect(ae.getService()).andReturn(as);
         control.replay();
-        rme.createService();
-        Service s = rme.getService();
+        rme.createServices();
+        Service s = rme.getService(ProtocolVariation.RM10WSA200408);
         assertNotNull(s);
         WrappedService ws = (WrappedService)s;
         assertSame(as, ws.getWrappedService());
@@ -172,17 +172,16 @@ public class RMEndpointTest extends Asse
     @Test
     public void testCreateEndpoint() throws NoSuchMethodException {
         Method m = RMEndpoint.class.getDeclaredMethod("getUsingAddressing", new Class[] {EndpointInfo.class});
-        rme = EasyMock.createMockBuilder(RMEndpoint.class)
+        rme = EasyMock.createMockBuilder(RMEndpoint.class).withConstructor(manager, ae)
             .addMockedMethod(m).createMock(control);
         rme.setAplicationEndpoint(ae);
         rme.setManager(manager);
-        rme.setProtocol(ProtocolVariation.RM10WSA200408);
         Service as = control.createMock(Service.class);
         EasyMock.expect(ae.getService()).andReturn(as);
         EndpointInfo aei = control.createMock(EndpointInfo.class);
-        EasyMock.expect(ae.getEndpointInfo()).andReturn(aei).times(2);
+        EasyMock.expect(ae.getEndpointInfo()).andReturn(aei).anyTimes();
         SoapBindingInfo bi = control.createMock(SoapBindingInfo.class);
-        EasyMock.expect(aei.getBinding()).andReturn(bi); 
+        EasyMock.expect(aei.getBinding()).andReturn(bi).anyTimes(); 
         SoapVersion sv = Soap11.getInstance();
         EasyMock.expect(bi.getSoapVersion()).andReturn(sv);
         String ns = "http://schemas.xmlsoap.org/wsdl/soap/";
@@ -193,12 +192,12 @@ public class RMEndpointTest extends Asse
         Object ua = new Object();
         EasyMock.expect(rme.getUsingAddressing(aei)).andReturn(ua);
         control.replay();
-        rme.createService();
-        rme.createEndpoint(null);
-        Endpoint e = rme.getEndpoint();
+        rme.createServices();
+        rme.createEndpoints(null);
+        Endpoint e = rme.getEndpoint(ProtocolVariation.RM10WSA200408);
         WrappedEndpoint we = (WrappedEndpoint)e;
         assertSame(ae, we.getWrappedEndpoint());
-        Service s = rme.getService();
+        Service s = rme.getService(ProtocolVariation.RM10WSA200408);
         assertEquals(1, s.getEndpoints().size());
         assertSame(e, s.getEndpoints().get(RM10Constants.PORT_NAME));
     }
@@ -273,13 +272,13 @@ public class RMEndpointTest extends Asse
 
     @Test
     public void testSetPolicies() throws NoSuchMethodException {
-        Method m = RMEndpoint.class.getDeclaredMethod("getEndpoint", new Class[] {});
+        Method m = RMEndpoint.class.getDeclaredMethod("getEndpoint", new Class[] {ProtocolVariation.class});
         rme = EasyMock.createMockBuilder(RMEndpoint.class)
             .addMockedMethod(m).createMock(control);
         rme.setAplicationEndpoint(ae);
         rme.setManager(manager);
         Endpoint e = control.createMock(Endpoint.class);
-        EasyMock.expect(rme.getEndpoint()).andReturn(e);
+        EasyMock.expect(rme.getEndpoint(ProtocolVariation.RM10WSA200408)).andReturn(e);
         EndpointInfo ei = control.createMock(EndpointInfo.class);
         EasyMock.expect(e.getEndpointInfo()).andReturn(ei);
         Bus bus = control.createMock(Bus.class);
@@ -363,7 +362,7 @@ public class RMEndpointTest extends Asse
     }
 
     private void verifyService() {
-        Service service = rme.getService();
+        Service service = rme.getService(ProtocolVariation.RM10WSA200408);
         ServiceInfo si = service.getServiceInfos().get(0);
         assertNotNull("service info is null", si);
 

Modified: cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMInInterceptorTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMInInterceptorTest.java?rev=1307604&r1=1307603&r2=1307604&view=diff
==============================================================================
--- cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMInInterceptorTest.java (original)
+++ cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMInInterceptorTest.java Fri Mar 30 20:50:22 2012
@@ -35,6 +35,7 @@ import org.apache.cxf.phase.PhaseInterce
 import org.apache.cxf.ws.addressing.AttributedURIType;
 import org.apache.cxf.ws.addressing.JAXWSAConstants;
 import org.apache.cxf.ws.addressing.MAPAggregator;
+import org.apache.cxf.ws.addressing.VersionTransformer.Names200408;
 import org.apache.cxf.ws.addressing.impl.AddressingPropertiesImpl;
 import org.apache.cxf.ws.policy.AssertionInfoMap;
 import org.apache.cxf.ws.rm.v200702.CreateSequenceResponseType;
@@ -110,7 +111,7 @@ public class RMInInterceptorTest extends
         EasyMock.expect(servant.createSequence(message)).andReturn(csr);
         Proxy proxy = control.createMock(Proxy.class);
         EasyMock.expect(rme.getProxy()).andReturn(proxy);
-        proxy.createSequenceResponse(csr);
+        proxy.createSequenceResponse(csr, ProtocolVariation.RM10WSA200408);
         EasyMock.expectLastCall();
         
         control.replay();
@@ -130,14 +131,14 @@ public class RMInInterceptorTest extends
     private void testHandleSequenceAck(boolean onServer) throws SequenceFault, RMException, 
     NoSuchMethodException {
         Method m = RMInInterceptor.class.getDeclaredMethod("processAcknowledgments",
-            new Class[] {RMEndpoint.class, RMProperties.class});
+            new Class[] {RMEndpoint.class, RMProperties.class, ProtocolVariation.class});
         interceptor =
             EasyMock.createMockBuilder(RMInInterceptor.class)
                 .addMockedMethod(m).createMock(control);
         Message message = setupInboundMessage(RM10Constants.SEQUENCE_ACKNOWLEDGMENT_ACTION, onServer);
         rme.receivedControlMessage();
         EasyMock.expectLastCall();
-        interceptor.processAcknowledgments(rme, rmps);
+        interceptor.processAcknowledgments(rme, rmps, ProtocolVariation.RM10WSA200408);
         EasyMock.expectLastCall();
         EasyMock.expect(message.get(AssertionInfoMap.class)).andReturn(null);
 
@@ -189,7 +190,7 @@ public class RMInInterceptorTest extends
     private void testAppMessage(boolean onServer, boolean deferredAbort) 
         throws SequenceFault, RMException, NoSuchMethodException {
         Method m1 = RMInInterceptor.class.getDeclaredMethod("processAcknowledgments",
-            new Class[] {RMEndpoint.class, RMProperties.class});
+            new Class[] {RMEndpoint.class, RMProperties.class, ProtocolVariation.class});
         Method m2 = RMInInterceptor.class.getDeclaredMethod("processAcknowledgmentRequests",
             new Class[] {Destination.class, Message.class});
         Method m3 = RMInInterceptor.class.getDeclaredMethod("processSequence",
@@ -202,7 +203,7 @@ public class RMInInterceptorTest extends
         Message message = setupInboundMessage("greetMe", true);
         Destination d = control.createMock(Destination.class);
         EasyMock.expect(manager.getDestination(message)).andReturn(d);
-        interceptor.processAcknowledgments(rme, rmps);
+        interceptor.processAcknowledgments(rme, rmps, ProtocolVariation.RM10WSA200408);
         EasyMock.expectLastCall();
         interceptor.processAcknowledgmentRequests(d, message);
         EasyMock.expectLastCall();
@@ -234,7 +235,6 @@ public class RMInInterceptorTest extends
         Source source = control.createMock(Source.class);
         rme = control.createMock(RMEndpoint.class);
         EasyMock.expect(rme.getSource()).andReturn(source).anyTimes();
-        EasyMock.expect(rme.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408).anyTimes();
         interceptor.setManager(manager);
         SequenceAcknowledgement ack1 = control.createMock(SequenceAcknowledgement.class);
         SequenceAcknowledgement ack2 = control.createMock(SequenceAcknowledgement.class);
@@ -253,7 +253,7 @@ public class RMInInterceptorTest extends
         EasyMock.expect(source.getSequence(id2)).andReturn(null);
         control.replay();
         try {
-            interceptor.processAcknowledgments(rme, rmps);
+            interceptor.processAcknowledgments(rme, rmps, ProtocolVariation.RM10WSA200408);
             fail("Expected SequenceFault not thrown");
         } catch (SequenceFault sf) {
             assertEquals(RM10Constants.UNKNOWN_SEQUENCE_FAULT_QNAME, sf.getFaultCode());
@@ -307,6 +307,10 @@ public class RMInInterceptorTest extends
         EasyMock.expect(exchange.getDestination()).andReturn(td);
         
         manager = control.createMock(RMManager.class);
+        EasyMock.expect(manager.getRMNamespace(EasyMock.same(message)))
+            .andReturn(RM10Constants.NAMESPACE_URI);
+        EasyMock.expect(manager.getAddressingNamespace(EasyMock.same(message)))
+            .andReturn(Names200408.WSA_NAMESPACE_NAME);
         interceptor.setManager(manager);
         rme = control.createMock(RMEndpoint.class);
         EasyMock.expect(manager.getReliableEndpoint(message)).andReturn(rme);

Modified: cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMManagerConfigurationTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMManagerConfigurationTest.java?rev=1307604&r1=1307603&r2=1307604&view=diff
==============================================================================
--- cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMManagerConfigurationTest.java (original)
+++ cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMManagerConfigurationTest.java Fri Mar 30 20:50:22 2012
@@ -117,8 +117,7 @@ public class RMManagerConfigurationTest 
             
         }
 
-        public Collection<DestinationSequence> getDestinationSequences(String endpointIdentifier,
-            ProtocolVariation protocol) {
+        public Collection<DestinationSequence> getDestinationSequences(String endpointIdentifier) {
             // TODO Auto-generated method stub
             return null;
         }
@@ -128,8 +127,7 @@ public class RMManagerConfigurationTest 
             return null;
         }
 
-        public Collection<SourceSequence> getSourceSequences(String endpointIdentifier,
-            ProtocolVariation protocol) {
+        public Collection<SourceSequence> getSourceSequences(String endpointIdentifier) {
             // TODO Auto-generated method stub
             return null;
         }
@@ -159,12 +157,12 @@ public class RMManagerConfigurationTest 
             
         }
 
-        public SourceSequence getSourceSequence(Identifier seq, ProtocolVariation protocol) {
+        public SourceSequence getSourceSequence(Identifier seq) {
             // TODO Auto-generated method stub
             return null;
         }
 
-        public DestinationSequence getDestinationSequence(Identifier seq, ProtocolVariation protocol) {
+        public DestinationSequence getDestinationSequence(Identifier seq) {
             // TODO Auto-generated method stub
             return null;
         }

Modified: cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMManagerTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMManagerTest.java?rev=1307604&r1=1307603&r2=1307604&view=diff
==============================================================================
--- cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMManagerTest.java (original)
+++ cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMManagerTest.java Fri Mar 30 20:50:22 2012
@@ -26,7 +26,6 @@ import java.util.Collection;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 import java.util.TimerTask;
 
 import javax.xml.namespace.QName;
@@ -136,12 +135,12 @@ public class RMManagerTest extends Asser
     @Test
     public void testStartServer() throws NoSuchMethodException {
         Method m = RMManager.class.getDeclaredMethod("recoverReliableEndpoint",
-            new Class[] {Endpoint.class, Conduit.class, ProtocolVariation.class});
+            new Class[] {Endpoint.class, Conduit.class});
         manager = control.createMock(RMManager.class, new Method[] {m});
         Server s = control.createMock(Server.class);
         Endpoint e = control.createMock(Endpoint.class);
         EasyMock.expect(s.getEndpoint()).andReturn(e);
-        manager.recoverReliableEndpoint(e, (Conduit)null, ProtocolVariation.RM10WSA200408);
+        manager.recoverReliableEndpoint(e, (Conduit)null);
         EasyMock.expectLastCall();
         control.replay();
         manager.startServer(s);
@@ -166,7 +165,7 @@ public class RMManagerTest extends Asser
     @Test
     public void testClientCreated() throws NoSuchMethodException {
         Method m = RMManager.class.getDeclaredMethod("recoverReliableEndpoint",
-            new Class[] {Endpoint.class, Conduit.class, ProtocolVariation.class});
+            new Class[] {Endpoint.class, Conduit.class});
         manager = control.createMock(RMManager.class, new Method[] {m});
         Client client = control.createMock(Client.class);
         
@@ -207,11 +206,11 @@ public class RMManagerTest extends Asser
     @Test
     public void testGetReliableEndpointServerSideCreate() throws NoSuchMethodException, RMException {
         Method m1 = RMManager.class.getDeclaredMethod("createReliableEndpoint", 
-            new Class[] {Endpoint.class, ProtocolVariation.class});
+            new Class[] {Endpoint.class});
         Method m2 = RMManager.class.getDeclaredMethod("getRMNamespace",  new Class[] {Message.class});
         Method m3 = RMManager.class.getDeclaredMethod("getAddressingNamespace",  new Class[] {Message.class});
         manager = control.createMock(RMManager.class, new Method[] {m1, m2, m3});
-        manager.setEndpointMaps(new HashMap<ProtocolVariation, Map<Endpoint, RMEndpoint>>());
+        manager.setReliableEndpointsMap(new HashMap<Endpoint, RMEndpoint>());
         Message message = control.createMock(Message.class);
         Exchange exchange = control.createMock(Exchange.class);
         EasyMock.expect(message.getExchange()).andReturn(exchange).anyTimes();
@@ -227,7 +226,7 @@ public class RMManagerTest extends Asser
         Endpoint e = control.createMock(Endpoint.class);
         EasyMock.expect(wre.getWrappedEndpoint()).andReturn(e).anyTimes();        
         RMEndpoint rme = control.createMock(RMEndpoint.class);
-        EasyMock.expect(manager.createReliableEndpoint(e, ProtocolVariation.RM10WSA200408))
+        EasyMock.expect(manager.createReliableEndpoint(e))
             .andReturn(rme).anyTimes();
         org.apache.cxf.transport.Destination destination = control
             .createMock(org.apache.cxf.transport.Destination.class);
@@ -264,11 +263,11 @@ public class RMManagerTest extends Asser
     @Test
     public void testGetReliableEndpointClientSideCreate() throws NoSuchMethodException, RMException {
         Method m1 = RMManager.class.getDeclaredMethod("createReliableEndpoint", 
-            new Class[] {Endpoint.class, ProtocolVariation.class});
+            new Class[] {Endpoint.class});
         Method m2 = RMManager.class.getDeclaredMethod("getRMNamespace",  new Class[] {Message.class});
         Method m3 = RMManager.class.getDeclaredMethod("getAddressingNamespace",  new Class[] {Message.class});
         manager = control.createMock(RMManager.class, new Method[] {m1, m2, m3});
-        manager.setEndpointMaps(new HashMap<ProtocolVariation, Map<Endpoint, RMEndpoint>>());
+        manager.setReliableEndpointsMap(new HashMap<Endpoint, RMEndpoint>());
         Message message = control.createMock(Message.class);
         Exchange exchange = control.createMock(Exchange.class);
         EasyMock.expect(message.getExchange()).andReturn(exchange).anyTimes();
@@ -282,7 +281,7 @@ public class RMManagerTest extends Asser
         EasyMock.expect(manager.getAddressingNamespace(message)).andReturn(Names200408.WSA_NAMESPACE_NAME)
             .anyTimes();
         RMEndpoint rme = control.createMock(RMEndpoint.class);
-        EasyMock.expect(manager.createReliableEndpoint(endpoint, ProtocolVariation.RM10WSA200408))
+        EasyMock.expect(manager.createReliableEndpoint(endpoint))
             .andReturn(rme);
         EasyMock.expect(exchange.getDestination()).andReturn(null);
         Conduit conduit = control.createMock(Conduit.class);
@@ -311,10 +310,11 @@ public class RMManagerTest extends Asser
     @Test
     public void testGetReliableEndpointExisting() throws NoSuchMethodException, RMException {
         Method m1 = RMManager.class.getDeclaredMethod("createReliableEndpoint", 
-            new Class[] {Endpoint.class, ProtocolVariation.class});
+            new Class[] {Endpoint.class});
         Method m2 = RMManager.class.getDeclaredMethod("getRMNamespace",  new Class[] {Message.class});
         Method m3 = RMManager.class.getDeclaredMethod("getAddressingNamespace",  new Class[] {Message.class});
         manager = control.createMock(RMManager.class, new Method[] {m1, m2, m3});
+        manager.setReliableEndpointsMap(new HashMap<Endpoint, RMEndpoint>());
         Message message = control.createMock(Message.class);
         EasyMock.expect(manager.getRMNamespace(message)).andReturn(RM10Constants.NAMESPACE_URI).anyTimes();
         EasyMock.expect(manager.getAddressingNamespace(message)).andReturn(Names200408.WSA_NAMESPACE_NAME)
@@ -328,8 +328,7 @@ public class RMManagerTest extends Asser
         QName name = new QName("http://x.y.z/a", "GreeterPort");
         EasyMock.expect(ei.getName()).andReturn(name);
         RMEndpoint rme = control.createMock(RMEndpoint.class);
-        manager.setEndpointMaps(new HashMap<ProtocolVariation, Map<Endpoint, RMEndpoint>>());
-        manager.getEndpointMaps().get(ProtocolVariation.RM10WSA200408).put(endpoint, rme);
+        manager.getReliableEndpointsMap().put(endpoint, rme);
 
         control.replay();
         assertSame(rme, manager.getReliableEndpoint(message));
@@ -402,6 +401,8 @@ public class RMManagerTest extends Asser
         Method m = RMManager.class.getDeclaredMethod("getSource", new Class[] {Message.class});
         manager = control.createMock(RMManager.class, new Method[] {m});
         Message message = control.createMock(Message.class);
+        EasyMock.expect(RMContextUtils.getProtocolVariation(message))
+            .andReturn(ProtocolVariation.RM10WSA200408);
         Exchange exchange = control.createMock(Exchange.class);
         EasyMock.expect(message.getExchange()).andReturn(exchange).anyTimes();
         EasyMock.expect(exchange.getOutMessage()).andReturn(message).anyTimes();
@@ -426,11 +427,12 @@ public class RMManagerTest extends Asser
         CreateSequenceResponseType createResponse = control.createMock(CreateSequenceResponseType.class);
         proxy.createSequence(EasyMock.isA(EndpointReferenceType.class),
                              (RelatesToType)EasyMock.isNull(),
-                             EasyMock.eq(false));
+                             EasyMock.eq(false),
+                             EasyMock.isA(ProtocolVariation.class));
         EasyMock.expectLastCall().andReturn(createResponse);
         Servant servant = control.createMock(Servant.class);
         EasyMock.expect(rme.getServant()).andReturn(servant);
-        servant.createSequenceResponse(createResponse);
+        servant.createSequenceResponse(createResponse, ProtocolVariation.RM10WSA200408);
         EasyMock.expectLastCall();
         SourceSequence sseq = control.createMock(SourceSequence.class);
         EasyMock.expect(source.awaitCurrent(inSid)).andReturn(sseq);
@@ -448,7 +450,7 @@ public class RMManagerTest extends Asser
         manager = bus.getExtension(RMManager.class);        
         Endpoint e = control.createMock(Endpoint.class);
         RMEndpoint rme = control.createMock(RMEndpoint.class);
-        manager.getEndpointMaps().get(ProtocolVariation.RM10WSA200408).put(e, rme);
+        manager.getReliableEndpointsMap().put(e, rme);
         manager.getTimer(); //start the timer
         rme.shutdown();
         EasyMock.expectLastCall();
@@ -478,12 +480,12 @@ public class RMManagerTest extends Asser
         control.verify();
         
         control.reset();
-        manager.getEndpointMaps().get(ProtocolVariation.RM10WSA200408).put(e, rme);
+        manager.getReliableEndpointsMap().put(e, rme);
         rme.shutdown();
         EasyMock.expectLastCall();
         control.replay();
         manager.shutdownReliableEndpoint(e);
-        assertNull(manager.getEndpointMaps().get(ProtocolVariation.RM10WSA200408).get(e));  
+        assertNull(manager.getReliableEndpointsMap().get(e));  
         control.verify();
     }
     
@@ -494,7 +496,7 @@ public class RMManagerTest extends Asser
         Conduit conduit = control.createMock(Conduit.class);
                 
         control.replay();
-        manager.recoverReliableEndpoint(endpoint, conduit, ProtocolVariation.RM10WSA200408);
+        manager.recoverReliableEndpoint(endpoint, conduit);
         control.verify();
         
         control.reset();
@@ -503,15 +505,16 @@ public class RMManagerTest extends Asser
         manager.setStore(store);
        
         control.replay();
-        manager.recoverReliableEndpoint(endpoint, conduit, ProtocolVariation.RM10WSA200408);
+        manager.recoverReliableEndpoint(endpoint, conduit);
         control.verify();           
     }
     
     @Test
     public void testRecoverReliableClientEndpoint() throws NoSuchMethodException {
         Method method = RMManager.class.getDeclaredMethod("createReliableEndpoint", 
-            new Class[] {Endpoint.class, ProtocolVariation.class});
+            new Class[] {Endpoint.class});
         manager = control.createMock(RMManager.class, new Method[] {method});
+        manager.setReliableEndpointsMap(new HashMap<Endpoint, RMEndpoint>());
         Endpoint endpoint = control.createMock(Endpoint.class);
         EndpointInfo ei = control.createMock(EndpointInfo.class);
         ServiceInfo si = control.createMock(ServiceInfo.class);  
@@ -521,7 +524,7 @@ public class RMManagerTest extends Asser
         Conduit conduit = control.createMock(Conduit.class);        
         setUpRecoverReliableEndpoint(endpoint, conduit, null, null, null);
         control.replay();
-        manager.recoverReliableEndpoint(endpoint, conduit, ProtocolVariation.RM10WSA200408);
+        manager.recoverReliableEndpoint(endpoint, conduit);
         control.verify();
         
         control.reset();
@@ -530,7 +533,7 @@ public class RMManagerTest extends Asser
         DestinationSequence ds = control.createMock(DestinationSequence.class);
         setUpRecoverReliableEndpoint(endpoint, conduit, ss, ds, null);
         control.replay();
-        manager.recoverReliableEndpoint(endpoint, conduit, ProtocolVariation.RM10WSA200408);
+        manager.recoverReliableEndpoint(endpoint, conduit);
         control.verify();
         
         control.reset();
@@ -538,7 +541,7 @@ public class RMManagerTest extends Asser
         RMMessage m = control.createMock(RMMessage.class);
         setUpRecoverReliableEndpoint(endpoint, conduit, ss, ds, m);        
         control.replay();
-        manager.recoverReliableEndpoint(endpoint, conduit, ProtocolVariation.RM10WSA200408);
+        manager.recoverReliableEndpoint(endpoint, conduit);
         control.verify();        
     }
     
@@ -568,7 +571,7 @@ public class RMManagerTest extends Asser
         if (null != ss) {
             sss.add(ss);            
         }
-        EasyMock.expect(store.getSourceSequences("{S}s.{P}p", ProtocolVariation.RM10WSA200408))
+        EasyMock.expect(store.getSourceSequences("{S}s.{P}p"))
             .andReturn(sss);
         if (null == ss) {
             return;
@@ -578,7 +581,7 @@ public class RMManagerTest extends Asser
         if (null != ds) {
             dss.add(ds);            
         }
-        EasyMock.expect(store.getDestinationSequences("{S}s.{P}p", ProtocolVariation.RM10WSA200408))
+        EasyMock.expect(store.getDestinationSequences("{S}s.{P}p"))
             .andReturn(dss);
         if (null == ds) {
             return;
@@ -593,9 +596,8 @@ public class RMManagerTest extends Asser
         EasyMock.expect(store.getMessages(id, true)).andReturn(ms);
         
         
-        manager.setEndpointMaps(new HashMap<ProtocolVariation, Map<Endpoint, RMEndpoint>>());
         RMEndpoint rme = control.createMock(RMEndpoint.class);
-        EasyMock.expect(manager.createReliableEndpoint(endpoint, ProtocolVariation.RM10WSA200408))
+        EasyMock.expect(manager.createReliableEndpoint(endpoint))
             .andReturn(rme);
         Source source = control.createMock(Source.class);
         EasyMock.expect(rme.getSource()).andReturn(source).anyTimes();

Modified: cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMOutInterceptorTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMOutInterceptorTest.java?rev=1307604&r1=1307603&r2=1307604&view=diff
==============================================================================
--- cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMOutInterceptorTest.java (original)
+++ cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMOutInterceptorTest.java Fri Mar 30 20:50:22 2012
@@ -35,6 +35,7 @@ import org.apache.cxf.ws.addressing.Attr
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
 import org.apache.cxf.ws.addressing.JAXWSAConstants;
 import org.apache.cxf.ws.addressing.MAPAggregator;
+import org.apache.cxf.ws.addressing.VersionTransformer.Names200408;
 import org.apache.cxf.ws.addressing.impl.AddressingPropertiesImpl;
 import org.apache.cxf.ws.rm.v200702.Identifier;
 import org.easymock.EasyMock;
@@ -133,6 +134,10 @@ public class RMOutInterceptorTest extend
             andReturn(rmpsOut).anyTimes();
         InterceptorChain chain = control.createMock(InterceptorChain.class);
         EasyMock.expect(message.getInterceptorChain()).andReturn(chain).anyTimes();
+        EasyMock.expect(manager.getRMNamespace(EasyMock.same(message)))
+            .andReturn(RM10Constants.NAMESPACE_URI);
+        EasyMock.expect(manager.getAddressingNamespace(EasyMock.same(message)))
+            .andReturn(Names200408.WSA_NAMESPACE_NAME);
         chain.add(EasyMock.isA(RetransmissionInterceptor.class));
         EasyMock.expectLastCall();
         RetransmissionQueue queue = control.createMock(RetransmissionQueue.class);
@@ -141,13 +146,13 @@ public class RMOutInterceptorTest extend
         EasyMock.expectLastCall();
                 
         RMEndpoint rme = control.createMock(RMEndpoint.class);
-        EasyMock.expect(rme.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408).anyTimes();
         Source source = control.createMock(Source.class);
         EasyMock.expect(source.getReliableEndpoint()).andReturn(rme).anyTimes();
         EasyMock.expect(manager.getSource(message)).andReturn(source).anyTimes();
         Destination destination = control.createMock(Destination.class);
         EasyMock.expect(manager.getDestination(message)).andReturn(destination).anyTimes();
         SourceSequence sseq = control.createMock(SourceSequence.class);
+        EasyMock.expect(sseq.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408).anyTimes(); 
         EasyMock.expect(manager.getSequence((Identifier)EasyMock.isNull(), EasyMock.same(message), 
                                         EasyMock.same(maps))).andReturn(sseq).anyTimes();
         EasyMock.expect(sseq.nextMessageNumber((Identifier)EasyMock.isNull(), 

Modified: cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/ServantTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/ServantTest.java?rev=1307604&r1=1307603&r2=1307604&view=diff
==============================================================================
--- cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/ServantTest.java (original)
+++ cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/ServantTest.java Fri Mar 30 20:50:22 2012
@@ -83,7 +83,6 @@ public class ServantTest extends Assert 
 
         EasyMock.expect(rme.getDestination()).andReturn(destination).anyTimes();
         EasyMock.expect(rme.getManager()).andReturn(manager).anyTimes();
-        EasyMock.expect(rme.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408).anyTimes();
 
         control.replay();
 
@@ -209,6 +208,8 @@ public class ServantTest extends Assert 
         MessageContentsList contents = new MessageContentsList();
         contents.add(cs);
         message.setContent(List.class, contents);
+
+        RMContextUtils.setProtocolVariation(message, ProtocolVariation.RM10WSA200408);
         
         return message;
     }

Modified: cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStoreTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStoreTest.java?rev=1307604&r1=1307603&r2=1307604&view=diff
==============================================================================
--- cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStoreTest.java (original)
+++ cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStoreTest.java Fri Mar 30 20:50:22 2012
@@ -132,6 +132,7 @@ public class RMTxStoreTest extends Asser
         EasyMock.expect(seq.getExpires()).andReturn(null);
         EasyMock.expect(seq.getOfferingSequenceIdentifier()).andReturn(null);
         EasyMock.expect(seq.getEndpointIdentifier()).andReturn(CLIENT_ENDPOINT_ID);
+        EasyMock.expect(seq.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408);
         
         control.replay();
         store.createSourceSequence(seq);   
@@ -142,6 +143,7 @@ public class RMTxStoreTest extends Asser
         EasyMock.expect(seq.getExpires()).andReturn(null);
         EasyMock.expect(seq.getOfferingSequenceIdentifier()).andReturn(null);
         EasyMock.expect(seq.getEndpointIdentifier()).andReturn(CLIENT_ENDPOINT_ID);
+        EasyMock.expect(seq.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408);
         
         control.replay();
         try {
@@ -163,7 +165,7 @@ public class RMTxStoreTest extends Asser
         sid3.setValue("offeringSequence3");
         EasyMock.expect(seq.getOfferingSequenceIdentifier()).andReturn(sid3);
         EasyMock.expect(seq.getEndpointIdentifier()).andReturn(SERVER_ENDPOINT_ID);
-        
+        EasyMock.expect(seq.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408);
          
         control.replay();
         store.createSourceSequence(seq);   
@@ -185,7 +187,8 @@ public class RMTxStoreTest extends Asser
         EasyMock.expect(seq.getIdentifier()).andReturn(sid1);
         EasyMock.expect(seq.getAcksTo()).andReturn(epr);        
         EasyMock.expect(seq.getEndpointIdentifier()).andReturn(SERVER_ENDPOINT_ID);
-        
+        EasyMock.expect(seq.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408);
+
         control.replay();
         store.createDestinationSequence(seq);   
         control.verify();
@@ -194,6 +197,7 @@ public class RMTxStoreTest extends Asser
         EasyMock.expect(seq.getIdentifier()).andReturn(sid1);
         EasyMock.expect(seq.getAcksTo()).andReturn(epr);        
         EasyMock.expect(seq.getEndpointIdentifier()).andReturn(SERVER_ENDPOINT_ID);
+        EasyMock.expect(seq.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408);
         
         control.replay();
         try {
@@ -213,6 +217,7 @@ public class RMTxStoreTest extends Asser
         epr = RMUtils.createReference(NON_ANON_ACKS_TO);
         EasyMock.expect(seq.getAcksTo()).andReturn(epr);
         EasyMock.expect(seq.getEndpointIdentifier()).andReturn(CLIENT_ENDPOINT_ID);
+        EasyMock.expect(seq.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408);
         
         control.replay();
         store.createDestinationSequence(seq);   
@@ -299,6 +304,7 @@ public class RMTxStoreTest extends Asser
         EasyMock.expect(seq.getIdentifier()).andReturn(sid1);
         EasyMock.expect(seq.getAcksTo()).andReturn(epr);        
         EasyMock.expect(seq.getEndpointIdentifier()).andReturn(SERVER_ENDPOINT_ID);
+        EasyMock.expect(seq.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408);
         
         control.replay();
         store.createDestinationSequence(seq);   
@@ -308,6 +314,7 @@ public class RMTxStoreTest extends Asser
         EasyMock.expect(seq.getLastMessageNumber()).andReturn(Long.valueOf(0));
         EasyMock.expect(seq.getAcknowledgment()).andReturn(ack1);        
         EasyMock.expect(seq.getIdentifier()).andReturn(sid1);
+        EasyMock.expect(seq.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408);
         
         control.replay();
         store.beginTransaction();
@@ -318,6 +325,7 @@ public class RMTxStoreTest extends Asser
         EasyMock.expect(seq.getLastMessageNumber()).andReturn(TEN);
         EasyMock.expect(seq.getAcknowledgment()).andReturn(ack1);        
         EasyMock.expect(seq.getIdentifier()).andReturn(sid1);
+        EasyMock.expect(seq.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408);
         
         control.replay();
         store.beginTransaction();
@@ -336,6 +344,7 @@ public class RMTxStoreTest extends Asser
         EasyMock.expect(seq.getExpires()).andReturn(null);
         EasyMock.expect(seq.getOfferingSequenceIdentifier()).andReturn(null);
         EasyMock.expect(seq.getEndpointIdentifier()).andReturn(CLIENT_ENDPOINT_ID);
+        EasyMock.expect(seq.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408);
         
         control.replay();
         store.createSourceSequence(seq);   
@@ -345,6 +354,7 @@ public class RMTxStoreTest extends Asser
         EasyMock.expect(seq.getCurrentMessageNr()).andReturn(ONE);
         EasyMock.expect(seq.isLastMessage()).andReturn(false);
         EasyMock.expect(seq.getIdentifier()).andReturn(sid1);   
+        EasyMock.expect(seq.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408);
         
         control.replay();
         store.beginTransaction();
@@ -355,6 +365,7 @@ public class RMTxStoreTest extends Asser
         EasyMock.expect(seq.getCurrentMessageNr()).andReturn(TEN);
         EasyMock.expect(seq.isLastMessage()).andReturn(true);  
         EasyMock.expect(seq.getIdentifier()).andReturn(sid1);
+        EasyMock.expect(seq.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408);
         
         control.replay();
         store.beginTransaction();
@@ -372,18 +383,18 @@ public class RMTxStoreTest extends Asser
         Identifier sid2 = null;
         
         Collection<DestinationSequence> seqs =
-            store.getDestinationSequences("unknown", ProtocolVariation.RM10WSA200408);
+            store.getDestinationSequences("unknown");
         assertEquals(0, seqs.size());
         
         try {
             sid1 = setupDestinationSequence("sequence1");
 
-            seqs = store.getDestinationSequences(SERVER_ENDPOINT_ID, ProtocolVariation.RM10WSA200408);
+            seqs = store.getDestinationSequences(SERVER_ENDPOINT_ID);
             assertEquals(1, seqs.size());
             checkRecoveredDestinationSequences(seqs);
 
             sid2 = setupDestinationSequence("sequence2");
-            seqs = store.getDestinationSequences(SERVER_ENDPOINT_ID, ProtocolVariation.RM10WSA200408);
+            seqs = store.getDestinationSequences(SERVER_ENDPOINT_ID);
             assertEquals(2, seqs.size());
             checkRecoveredDestinationSequences(seqs);
         } finally {
@@ -403,18 +414,18 @@ public class RMTxStoreTest extends Asser
         Identifier sid2 = null;
         
         Collection<SourceSequence> seqs =
-            store.getSourceSequences("unknown", ProtocolVariation.RM10WSA200408);
+            store.getSourceSequences("unknown");
         assertEquals(0, seqs.size());
         
         try {
             sid1 = setupSourceSequence("sequence1");
 
-            seqs = store.getSourceSequences(CLIENT_ENDPOINT_ID, ProtocolVariation.RM10WSA200408);
+            seqs = store.getSourceSequences(CLIENT_ENDPOINT_ID);
             assertEquals(1, seqs.size());
             checkRecoveredSourceSequences(seqs);
 
             sid2 = setupSourceSequence("sequence2");
-            seqs = store.getSourceSequences(CLIENT_ENDPOINT_ID, ProtocolVariation.RM10WSA200408);
+            seqs = store.getSourceSequences(CLIENT_ENDPOINT_ID);
             assertEquals(2, seqs.size());
             checkRecoveredSourceSequences(seqs);
         } finally {
@@ -434,18 +445,18 @@ public class RMTxStoreTest extends Asser
         Identifier sid2 = null;
         
         DestinationSequence seq = 
-            store.getDestinationSequence(new Identifier(), ProtocolVariation.RM10WSA200408);
+            store.getDestinationSequence(new Identifier());
         assertNull(seq);
 
         try {
             sid1 = setupDestinationSequence("sequence1");
 
-            seq = store.getDestinationSequence(sid1, ProtocolVariation.RM10WSA200408);
+            seq = store.getDestinationSequence(sid1);
             assertNotNull(seq);
             verifyDestinationSequence("sequence1", seq);
 
             sid2 = setupDestinationSequence("sequence2");
-            seq = store.getDestinationSequence(sid2, ProtocolVariation.RM10WSA200408);
+            seq = store.getDestinationSequence(sid2);
             assertNotNull(seq);
             verifyDestinationSequence("sequence2", seq);
         } finally {
@@ -465,18 +476,18 @@ public class RMTxStoreTest extends Asser
         Identifier sid2 = null;
         
         SourceSequence seq = 
-            store.getSourceSequence(new Identifier(), ProtocolVariation.RM10WSA200408);
+            store.getSourceSequence(new Identifier());
         assertNull(seq);
         
         try {
             sid1 = setupSourceSequence("sequence1");
 
-            seq = store.getSourceSequence(sid1, ProtocolVariation.RM10WSA200408);
+            seq = store.getSourceSequence(sid1);
             assertNotNull(seq);
             verifySourceSequence("sequence1", seq);
             
             sid2 = setupSourceSequence("sequence2");
-            seq = store.getSourceSequence(sid2, ProtocolVariation.RM10WSA200408);
+            seq = store.getSourceSequence(sid2);
             assertNotNull(seq);
             verifySourceSequence("sequence2", seq);
         } finally {
@@ -543,10 +554,12 @@ public class RMTxStoreTest extends Asser
         
         SequenceAcknowledgement ack = ack1;
         Long lmn = ZERO;
+        ProtocolVariation pv = ProtocolVariation.RM10WSA200408;
          
         if ("sequence2".equals(s)) {
             ack = ack2;
             lmn = TEN;
+            pv = ProtocolVariation.RM11WSA200508;
         }
         
         EasyMock.expect(seq.getIdentifier()).andReturn(sid);
@@ -555,7 +568,8 @@ public class RMTxStoreTest extends Asser
         EasyMock.expect(seq.getLastMessageNumber()).andReturn(lmn);
         EasyMock.expect(seq.getAcknowledgment()).andReturn(ack);
         EasyMock.expect(seq.getIdentifier()).andReturn(sid);
-        
+        EasyMock.expect(seq.getProtocol()).andReturn(pv);
+
         control.replay();
         store.createDestinationSequence(seq);           
         store.beginTransaction();
@@ -575,6 +589,7 @@ public class RMTxStoreTest extends Asser
         Identifier osid = null;
         Long cmn = ONE;
         boolean lm = false;
+        ProtocolVariation pv = ProtocolVariation.RM10WSA200408;
         
         if ("sequence2".equals(s)) {
             expiry = new Date(System.currentTimeMillis() + 3600 * 1000);
@@ -582,6 +597,7 @@ public class RMTxStoreTest extends Asser
             osid.setValue("offeringSequence");
             cmn = TEN;
             lm = true;            
+            pv = ProtocolVariation.RM11WSA200508;
         } 
         
         EasyMock.expect(seq.getIdentifier()).andReturn(sid);
@@ -591,7 +607,8 @@ public class RMTxStoreTest extends Asser
         EasyMock.expect(seq.getCurrentMessageNr()).andReturn(cmn);
         EasyMock.expect(seq.isLastMessage()).andReturn(lm);
         EasyMock.expect(seq.getIdentifier()).andReturn(sid);
-        
+        EasyMock.expect(seq.getProtocol()).andReturn(pv);
+
         control.replay();
         store.createSourceSequence(seq);           
         store.beginTransaction();
@@ -611,11 +628,13 @@ public class RMTxStoreTest extends Asser
             SequenceAcknowledgement sa = seq.getAcknowledgment();
             assertNotNull(sa);
             verifyAcknowledgementRanges(sa.getAcknowledgementRange(), new long[]{1, 1});
+            assertEquals(ProtocolVariation.RM10WSA200408, seq.getProtocol());
         } else if ("sequence2".equals(s)) {
             assertEquals(10, seq.getLastMessageNumber());
             SequenceAcknowledgement sa = seq.getAcknowledgment();
             assertNotNull(sa);
             verifyAcknowledgementRanges(sa.getAcknowledgementRange(), new long[]{1, 1, 3, 10});
+            assertEquals(ProtocolVariation.RM11WSA200508, seq.getProtocol());
         }
     }
     
@@ -627,12 +646,14 @@ public class RMTxStoreTest extends Asser
             assertNull(seq.getExpires());
             assertEquals(1, seq.getCurrentMessageNr());
             assertFalse(seq.isLastMessage());
+            assertEquals(ProtocolVariation.RM10WSA200408, seq.getProtocol());
         } else if ("sequence2".equals(s)) {
             Date expires = seq.getExpires();
             assertNotNull(expires);
             expires.after(new Date());
             assertEquals(10, seq.getCurrentMessageNr());
             assertTrue(seq.isLastMessage());
+            assertEquals(ProtocolVariation.RM11WSA200508, seq.getProtocol());
         }
     }
     
@@ -677,6 +698,7 @@ public class RMTxStoreTest extends Asser
                     recovered.getAcknowledgment().getAcknowledgementRange().get(0);
                 assertEquals(ONE, r.getLower());
                 assertEquals(ONE, r.getUpper());
+                assertEquals(ProtocolVariation.RM10WSA200408, recovered.getProtocol());
             } else {
                 assertEquals(10, recovered.getLastMessageNumber());
                 assertEquals(2, recovered.getAcknowledgment().getAcknowledgementRange().size());
@@ -687,6 +709,7 @@ public class RMTxStoreTest extends Asser
                 r = recovered.getAcknowledgment().getAcknowledgementRange().get(1);
                 assertEquals(new Long(3), r.getLower());
                 assertEquals(TEN, r.getUpper());                
+                assertEquals(ProtocolVariation.RM11WSA200508, recovered.getProtocol());
             }
         }
     }
@@ -701,11 +724,13 @@ public class RMTxStoreTest extends Asser
                 assertEquals(1, recovered.getCurrentMessageNr());  
                 assertNull(recovered.getExpires());
                 assertNull(recovered.getOfferingSequenceIdentifier());
+                assertEquals(ProtocolVariation.RM10WSA200408, recovered.getProtocol());
             } else {
                 assertTrue(recovered.isLastMessage());
                 assertEquals(10, recovered.getCurrentMessageNr()); 
                 assertNotNull(recovered.getExpires());
                 assertEquals("offeringSequence", recovered.getOfferingSequenceIdentifier().getValue());
+                assertEquals(ProtocolVariation.RM11WSA200508, recovered.getProtocol());
             }
         }
     }



Mime
View raw message