cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dsosno...@apache.org
Subject svn commit: r1150554 [2/2] - in /cxf/trunk: rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/ rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/persistence/ rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/persistence/jdbc/ rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/...
Date Mon, 25 Jul 2011 05:56:18 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=1150554&r1=1150553&r2=1150554&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 Mon Jul 25 05:56:11 2011
@@ -44,7 +44,6 @@ import org.apache.cxf.ws.addressing.Endp
 import org.apache.cxf.ws.addressing.Names;
 import org.apache.cxf.ws.addressing.RelatesToType;
 import org.apache.cxf.ws.rm.manager.SourcePolicyType;
-import org.apache.cxf.ws.rm.v200702.CreateSequenceResponseType;
 import org.apache.cxf.ws.rm.v200702.Identifier;
 import org.apache.cxf.ws.rm.v200702.OfferType;
 import org.easymock.classextension.EasyMock;
@@ -112,7 +111,7 @@ public class ProxyTest extends Assert {
             new Class[] {OperationInfo.class, Object[].class, Map.class});
         Proxy proxy = control.createMock(Proxy.class, new Method[] {m});
         proxy.setReliableEndpoint(rme);
-        EasyMock.expect(rme.getEncoderDecoder()).andReturn(EncoderDecoder11Impl.INSTANCE).anyTimes();
+        EasyMock.expect(rme.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408).anyTimes();
         DestinationSequence ds = control.createMock(DestinationSequence.class);
         EndpointReferenceType acksToEPR = control.createMock(EndpointReferenceType.class);
         EasyMock.expect(ds.getAcksTo()).andReturn(acksToEPR).anyTimes();
@@ -129,7 +128,7 @@ public class ProxyTest extends Assert {
         InterfaceInfo ii = control.createMock(InterfaceInfo.class);
         EasyMock.expect(si.getInterface()).andReturn(ii).anyTimes();
         OperationInfo oi = control.createMock(OperationInfo.class);
-        EasyMock.expect(ii.getOperation(RM11Constants.SEQUENCE_ACK_QNAME)).andReturn(oi).anyTimes();
+        EasyMock.expect(ii.getOperation(RM10Constants.SEQUENCE_ACK_QNAME)).andReturn(oi).anyTimes();
         expectInvoke(proxy, oi, null);
         control.replay();
         
@@ -168,9 +167,9 @@ public class ProxyTest extends Assert {
         InterfaceInfo ii = control.createMock(InterfaceInfo.class);
         EasyMock.expect(si.getInterface()).andReturn(ii).anyTimes();
         OperationInfo oi = control.createMock(OperationInfo.class);
-        EasyMock.expect(ii.getOperation(RM11Constants.CLOSE_SEQUENCE_QNAME)).andReturn(oi).anyTimes();
+        EasyMock.expect(ii.getOperation(RM10Constants.CLOSE_SEQUENCE_QNAME)).andReturn(oi).anyTimes();
         expectInvokeWithContext(proxy, oi, null);
-        EasyMock.expect(rme.getEncoderDecoder()).andReturn(EncoderDecoder11Impl.INSTANCE).anyTimes();
+        EasyMock.expect(rme.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408).anyTimes();
         control.replay();
         
         proxy.lastMessage(ss);
@@ -183,7 +182,7 @@ public class ProxyTest extends Assert {
             new Class[] {OperationInfo.class, Object[].class, Map.class});
         Proxy proxy = control.createMock(Proxy.class, new Method[] {m});
         proxy.setReliableEndpoint(rme);        
-        EasyMock.expect(rme.getEncoderDecoder()).andReturn(EncoderDecoder11Impl.INSTANCE).anyTimes();
+        EasyMock.expect(rme.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408).anyTimes();
         Endpoint endpoint = control.createMock(Endpoint.class);
         EasyMock.expect(rme.getEndpoint()).andReturn(endpoint).anyTimes();
         EndpointInfo epi = control.createMock(EndpointInfo.class);
@@ -193,7 +192,7 @@ public class ProxyTest extends Assert {
         InterfaceInfo ii = control.createMock(InterfaceInfo.class);
         EasyMock.expect(si.getInterface()).andReturn(ii).anyTimes();
         OperationInfo oi = control.createMock(OperationInfo.class);
-        EasyMock.expect(ii.getOperation(RM11Constants.TERMINATE_SEQUENCE_QNAME)).andReturn(oi).anyTimes();
+        EasyMock.expect(ii.getOperation(RM10Constants.TERMINATE_SEQUENCE_QNAME)).andReturn(oi).anyTimes();
         SourceSequence ss = control.createMock(SourceSequence.class);
         Identifier id = control.createMock(Identifier.class);
         EasyMock.expect(ss.getIdentifier()).andReturn(id).anyTimes();
@@ -208,7 +207,7 @@ public class ProxyTest extends Assert {
             new Class[] {OperationInfo.class, Object[].class, Map.class});
         Proxy proxy = control.createMock(Proxy.class, new Method[] {m});
         proxy.setReliableEndpoint(rme);
-        EasyMock.expect(rme.getEncoderDecoder()).andReturn(EncoderDecoder11Impl.INSTANCE).anyTimes();
+        EasyMock.expect(rme.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408).anyTimes();
         Endpoint endpoint = control.createMock(Endpoint.class);
         EasyMock.expect(rme.getEndpoint()).andReturn(endpoint).anyTimes();
         EndpointInfo epi = control.createMock(EndpointInfo.class);
@@ -218,9 +217,10 @@ public class ProxyTest extends Assert {
         InterfaceInfo ii = control.createMock(InterfaceInfo.class);
         EasyMock.expect(si.getInterface()).andReturn(ii).anyTimes();
         OperationInfo oi = control.createMock(OperationInfo.class);
-        EasyMock.expect(ii.getOperation(RM11Constants.CREATE_SEQUENCE_RESPONSE_ONEWAY_QNAME))
+        EasyMock.expect(ii.getOperation(RM10Constants.CREATE_SEQUENCE_RESPONSE_ONEWAY_QNAME))
             .andReturn(oi).anyTimes();
-        CreateSequenceResponseType csr = control.createMock(CreateSequenceResponseType.class);
+        org.apache.cxf.ws.rm.v200702.CreateSequenceResponseType csr =
+            control.createMock(org.apache.cxf.ws.rm.v200702.CreateSequenceResponseType.class);
         expectInvoke(proxy, oi, null);
         control.replay();
         proxy.createSequenceResponse(csr);
@@ -243,7 +243,7 @@ public class ProxyTest extends Assert {
                          org.apache.cxf.ws.addressing.EndpointReferenceType.class});
         Proxy proxy = control.createMock(Proxy.class, new Method[] {m});
         proxy.setReliableEndpoint(rme);
-        EasyMock.expect(rme.getEncoderDecoder()).andReturn(EncoderDecoder11Impl.INSTANCE).anyTimes();
+        EasyMock.expect(rme.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408).anyTimes();
 
         RMManager manager = control.createMock(RMManager.class);
         EasyMock.expect(rme.getManager()).andReturn(manager).anyTimes();
@@ -306,7 +306,7 @@ public class ProxyTest extends Assert {
             new Class[] {OperationInfo.class, Object[].class, Map.class});
         Proxy proxy = control.createMock(Proxy.class, new Method[] {m});
         proxy.setReliableEndpoint(rme);
-        EasyMock.expect(rme.getEncoderDecoder()).andReturn(EncoderDecoder11Impl.INSTANCE).anyTimes();
+        EasyMock.expect(rme.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408).anyTimes();
         
         RMManager manager = control.createMock(RMManager.class);
         EasyMock.expect(rme.getManager()).andReturn(manager).anyTimes();
@@ -315,7 +315,7 @@ public class ProxyTest extends Assert {
         EasyMock.expect(sp.getAcksTo()).andReturn(null).anyTimes();
         Duration d = DatatypeFactory.createDuration("PT12H");
         EasyMock.expect(sp.getSequenceExpiration()).andReturn(d).anyTimes();
-        EasyMock.expect(sp.isIncludeOffer()).andReturn(true).anyTimes();
+        EasyMock.expect(sp.isIncludeOffer()).andReturn(Boolean.TRUE).anyTimes();
         Duration dOffered = DatatypeFactory.createDuration("PT24H");
         EasyMock.expect(sp.getOfferedSequenceExpiration()).andReturn(dOffered).anyTimes();
         Source source = control.createMock(Source.class);
@@ -332,16 +332,17 @@ public class ProxyTest extends Assert {
         InterfaceInfo ii = control.createMock(InterfaceInfo.class);
         EasyMock.expect(si.getInterface()).andReturn(ii).anyTimes();
         OperationInfo oi = control.createMock(OperationInfo.class);
-        CreateSequenceResponseType csr = new CreateSequenceResponseType();
         if (isServer) {
-            EasyMock.expect(ii.getOperation(RM11Constants.CREATE_SEQUENCE_ONEWAY_QNAME))
+            EasyMock.expect(ii.getOperation(RM10Constants.CREATE_SEQUENCE_ONEWAY_QNAME))
                 .andReturn(oi).anyTimes();
             Endpoint ae = control.createMock(Endpoint.class);
             EasyMock.expect(rme.getApplicationEndpoint()).andReturn(ae).anyTimes();
             EasyMock.expect(ae.getExecutor()).andReturn(SynchronousExecutor.getInstance()).anyTimes();
             expectInvoke(proxy, oi, null);
         } else {
-            EasyMock.expect(ii.getOperation(RM11Constants.CREATE_SEQUENCE_QNAME)).andReturn(oi).anyTimes();
+            EasyMock.expect(ii.getOperation(RM10Constants.CREATE_SEQUENCE_QNAME)).andReturn(oi).anyTimes();
+            org.apache.cxf.ws.rm.v200502.CreateSequenceResponseType csr =
+                new org.apache.cxf.ws.rm.v200502.CreateSequenceResponseType();
             expectInvoke(proxy, oi, csr);
         }
         
@@ -354,7 +355,7 @@ public class ProxyTest extends Assert {
         if (isServer) {
             assertNull(proxy.createSequence(defaultAcksTo, relatesTo, isServer));
         } else {
-            assertEquals(csr, proxy.createSequence(defaultAcksTo, relatesTo, isServer));
+            assertNotNull(proxy.createSequence(defaultAcksTo, relatesTo, isServer));
         }
     }
     

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=1150554&r1=1150553&r2=1150554&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 Mon Jul 25 05:56:11 2011
@@ -54,6 +54,7 @@ import org.apache.neethi.Assertion;
 import org.apache.neethi.Policy;
 import org.easymock.classextension.EasyMock;
 import org.easymock.classextension.IMocksControl;
+
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
@@ -71,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, EncoderDecoder11Impl.INSTANCE);
+        rme = new RMEndpoint(manager, ae, ProtocolVariation.RM10WSA200408);
     }
 
     @After
@@ -173,7 +174,7 @@ public class RMEndpointTest extends Asse
         rme = control.createMock(RMEndpoint.class, new Method[] {m});
         rme.setAplicationEndpoint(ae);
         rme.setManager(manager);
-        rme.setEncoderDecoder(EncoderDecoder11Impl.INSTANCE);
+        rme.setProtocol(ProtocolVariation.RM10WSA200408);
         Service as = control.createMock(Service.class);
         EasyMock.expect(ae.getService()).andReturn(as);
         EndpointInfo aei = control.createMock(EndpointInfo.class);
@@ -197,7 +198,7 @@ public class RMEndpointTest extends Asse
         assertSame(ae, we.getWrappedEndpoint());
         Service s = rme.getService();
         assertEquals(1, s.getEndpoints().size());
-        assertSame(e, s.getEndpoints().get(RM11Constants.PORT_NAME));
+        assertSame(e, s.getEndpoints().get(RM10Constants.PORT_NAME));
     }
 
     @Test
@@ -317,22 +318,24 @@ public class RMEndpointTest extends Asse
     public void testShutdown() {
         DestinationSequence ds = control.createMock(DestinationSequence.class);
         Identifier did = control.createMock(Identifier.class);
-        EasyMock.expect(ds.getIdentifier()).andReturn(did);
+        EasyMock.expect(ds.getIdentifier()).andReturn(did).anyTimes();
+        EasyMock.expect(ds.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408).anyTimes();
         String d = "d";
-        EasyMock.expect(did.getValue()).andReturn(d);        
+        EasyMock.expect(did.getValue()).andReturn(d).anyTimes();        
         SourceSequence ss = control.createMock(SourceSequence.class);
         Identifier sid = control.createMock(Identifier.class);
-        EasyMock.expect(ss.getIdentifier()).andReturn(sid);
+        EasyMock.expect(ss.getIdentifier()).andReturn(sid).anyTimes();
+        EasyMock.expect(ss.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408).anyTimes();
         String s = "s";
-        EasyMock.expect(sid.getValue()).andReturn(s);        
+        EasyMock.expect(sid.getValue()).andReturn(s).anyTimes();        
         ds.cancelDeferredAcknowledgments();
-        EasyMock.expectLastCall();
+        EasyMock.expectLastCall().anyTimes();
         ds.cancelTermination();
-        EasyMock.expectLastCall();
+        EasyMock.expectLastCall().anyTimes();
         RetransmissionQueue queue = control.createMock(RetransmissionQueue.class);
-        EasyMock.expect(manager.getRetransmissionQueue()).andReturn(queue);
+        EasyMock.expect(manager.getRetransmissionQueue()).andReturn(queue).anyTimes();
         queue.stop(ss);
-        EasyMock.expectLastCall();
+        EasyMock.expectLastCall().anyTimes();
         control.replay();
         rme.getDestination().addSequence(ds, false);
         rme.getSource().addSequence(ss, false);
@@ -365,7 +368,7 @@ public class RMEndpointTest extends Asse
 
         assertEquals(7, intf.getOperations().size());
 
-        String ns = RM11Constants.NAMESPACE_URI;
+        String ns = RM10Constants.NAMESPACE_URI;
         OperationInfo oi = intf.getOperation(new QName(ns, "CreateSequence"));
         assertNotNull("No operation info.", oi);
         assertTrue("Operation is oneway.", !oi.isOneWay());

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=1150554&r1=1150553&r2=1150554&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 Mon Jul 25 05:56:11 2011
@@ -230,7 +230,7 @@ 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.getEncoderDecoder()).andReturn(EncoderDecoder10Impl.INSTANCE).anyTimes();
+        EasyMock.expect(rme.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408).anyTimes();
         interceptor.setManager(manager);
         SequenceAcknowledgement ack1 = control.createMock(SequenceAcknowledgement.class);
         SequenceAcknowledgement ack2 = control.createMock(SequenceAcknowledgement.class);
@@ -279,7 +279,7 @@ public class RMInInterceptorTest extends
         // TODO
     }
     
-    private Message setupInboundMessage(String action, boolean serverSide) {
+    private Message setupInboundMessage(String action, boolean serverSide) throws RMException {
         Message message = control.createMock(Message.class);
         Exchange exchange = control.createMock(Exchange.class);
         EasyMock.expect(message.getExchange()).andReturn(exchange).times(2);

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=1150554&r1=1150553&r2=1150554&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 Mon Jul 25 05:56:11 2011
@@ -116,7 +116,8 @@ public class RMManagerConfigurationTest 
             
         }
 
-        public Collection<DestinationSequence> getDestinationSequences(String endpointIdentifier) {
+        public Collection<DestinationSequence> getDestinationSequences(String endpointIdentifier,
+            ProtocolVariation protocol) {
             // TODO Auto-generated method stub
             return null;
         }
@@ -126,7 +127,8 @@ public class RMManagerConfigurationTest 
             return null;
         }
 
-        public Collection<SourceSequence> getSourceSequences(String endpointIdentifier) {
+        public Collection<SourceSequence> getSourceSequences(String endpointIdentifier,
+            ProtocolVariation protocol) {
             // TODO Auto-generated method stub
             return null;
         }
@@ -155,16 +157,6 @@ public class RMManagerConfigurationTest 
             // TODO Auto-generated method stub
             
         }
-
-        public SourceSequence getSourceSequence(Identifier seq) {
-            // TODO Auto-generated method stub
-            return null;
-        }
-
-        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=1150554&r1=1150553&r2=1150554&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 Mon Jul 25 05:56:11 2011
@@ -26,6 +26,7 @@ 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;
@@ -52,6 +53,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.RelatesToType;
+import org.apache.cxf.ws.addressing.VersionTransformer.Names200408;
 import org.apache.cxf.ws.rm.manager.SequenceTerminationPolicyType;
 import org.apache.cxf.ws.rm.manager.SourcePolicyType;
 import org.apache.cxf.ws.rm.persistence.RMMessage;
@@ -133,13 +135,13 @@ public class RMManagerTest extends Asser
     
     @Test
     public void testStartServer() throws NoSuchMethodException {
-        Method m = RMManager.class
-            .getDeclaredMethod("recoverReliableEndpoint", new Class[] {Endpoint.class, Conduit.class});
+        Method m = RMManager.class.getDeclaredMethod("recoverReliableEndpoint",
+            new Class[] {Endpoint.class, Conduit.class, ProtocolVariation.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);
+        manager.recoverReliableEndpoint(e, (Conduit)null, ProtocolVariation.RM10WSA200408);
         EasyMock.expectLastCall();
         control.replay();
         manager.startServer(s);
@@ -163,8 +165,8 @@ public class RMManagerTest extends Asser
     
     @Test
     public void testClientCreated() throws NoSuchMethodException {
-        Method m = RMManager.class
-            .getDeclaredMethod("recoverReliableEndpoint", new Class[] {Endpoint.class, Conduit.class});
+        Method m = RMManager.class.getDeclaredMethod("recoverReliableEndpoint",
+            new Class[] {Endpoint.class, Conduit.class, ProtocolVariation.class});
         manager = control.createMock(RMManager.class, new Method[] {m});
         Client client = control.createMock(Client.class);
         
@@ -203,33 +205,40 @@ public class RMManagerTest extends Asser
     }
     
     @Test
-    public void testGetReliableEndpointServerSideCreate() throws NoSuchMethodException {
-        Method m = RMManager.class.getDeclaredMethod("createReliableEndpoint", 
-            new Class[] {Endpoint.class, EncoderDecoder.class});
-        manager = control.createMock(RMManager.class, new Method[] {m});
-        manager.setReliableEndpointsMap(new HashMap<Endpoint, RMEndpoint>());
+    public void testGetReliableEndpointServerSideCreate() throws NoSuchMethodException, RMException {
+        Method m1 = RMManager.class.getDeclaredMethod("createReliableEndpoint", 
+            new Class[] {Endpoint.class, ProtocolVariation.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>>());
         Message message = control.createMock(Message.class);
         Exchange exchange = control.createMock(Exchange.class);
         EasyMock.expect(message.getExchange()).andReturn(exchange).anyTimes();
+        EasyMock.expect(manager.getRMNamespace(message)).andReturn(RM10Constants.NAMESPACE_URI).anyTimes();
+        EasyMock.expect(manager.getAddressingNamespace(message)).andReturn(Names200408.WSA_NAMESPACE_NAME)
+            .anyTimes();
         WrappedEndpoint wre = control.createMock(WrappedEndpoint.class);
-        EasyMock.expect(exchange.get(Endpoint.class)).andReturn(wre);
+        EasyMock.expect(exchange.get(Endpoint.class)).andReturn(wre).anyTimes();
         EndpointInfo ei = control.createMock(EndpointInfo.class);
-        EasyMock.expect(wre.getEndpointInfo()).andReturn(ei);
+        EasyMock.expect(wre.getEndpointInfo()).andReturn(ei).anyTimes();
         QName name = RM10Constants.PORT_NAME;
-        EasyMock.expect(ei.getName()).andReturn(name);
+        EasyMock.expect(ei.getName()).andReturn(name).anyTimes();
         Endpoint e = control.createMock(Endpoint.class);
-        EasyMock.expect(wre.getWrappedEndpoint()).andReturn(e);        
+        EasyMock.expect(wre.getWrappedEndpoint()).andReturn(e).anyTimes();        
         RMEndpoint rme = control.createMock(RMEndpoint.class);
-        EasyMock.expect(manager.createReliableEndpoint(e, null)).andReturn(rme);
+        EasyMock.expect(manager.createReliableEndpoint(e, ProtocolVariation.RM10WSA200408))
+            .andReturn(rme).anyTimes();
         org.apache.cxf.transport.Destination destination = control
             .createMock(org.apache.cxf.transport.Destination.class);
-        EasyMock.expect(exchange.getDestination()).andReturn(destination);
+        EasyMock.expect(exchange.getDestination()).andReturn(destination).anyTimes();
         AddressingPropertiesImpl maps = control.createMock(AddressingPropertiesImpl.class);
         EasyMock.expect(message.get(Message.REQUESTOR_ROLE)).andReturn(null);
-        EasyMock.expect(message.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND)).andReturn(maps);
+        EasyMock.expect(message.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND))
+            .andReturn(maps).anyTimes();
         EndpointReferenceType replyTo = RMUtils.createAnonymousReference();
-        EasyMock.expect(maps.getReplyTo()).andReturn(replyTo);
-        EasyMock.expect(exchange.getConduit(message)).andReturn(null);
+        EasyMock.expect(maps.getReplyTo()).andReturn(replyTo).anyTimes();
+        EasyMock.expect(exchange.getConduit(message)).andReturn(null).anyTimes();
         rme.initialise(null, replyTo, null);
         EasyMock.expectLastCall();
 
@@ -243,6 +252,9 @@ public class RMManagerTest extends Asser
         EasyMock.expect(wre.getEndpointInfo()).andReturn(ei);
         EasyMock.expect(ei.getName()).andReturn(name);
         EasyMock.expect(wre.getWrappedEndpoint()).andReturn(e); 
+        EasyMock.expect(manager.getRMNamespace(message)).andReturn(RM10Constants.NAMESPACE_URI).anyTimes();
+        EasyMock.expect(manager.getAddressingNamespace(message)).andReturn(Names200408.WSA_NAMESPACE_NAME)
+            .anyTimes();
 
         control.replay();
         assertSame(rme, manager.getReliableEndpoint(message));
@@ -250,11 +262,13 @@ public class RMManagerTest extends Asser
     }
     
     @Test
-    public void testGetReliableEndpointClientSideCreate() throws NoSuchMethodException {
-        Method m = RMManager.class.getDeclaredMethod("createReliableEndpoint", 
-            new Class[] {Endpoint.class, EncoderDecoder.class});
-        manager = control.createMock(RMManager.class, new Method[] {m});
-        manager.setReliableEndpointsMap(new HashMap<Endpoint, RMEndpoint>());
+    public void testGetReliableEndpointClientSideCreate() throws NoSuchMethodException, RMException {
+        Method m1 = RMManager.class.getDeclaredMethod("createReliableEndpoint", 
+            new Class[] {Endpoint.class, ProtocolVariation.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>>());
         Message message = control.createMock(Message.class);
         Exchange exchange = control.createMock(Exchange.class);
         EasyMock.expect(message.getExchange()).andReturn(exchange).anyTimes();
@@ -264,8 +278,12 @@ public class RMManagerTest extends Asser
         EasyMock.expect(endpoint.getEndpointInfo()).andReturn(ei);
         QName name = new QName("http://x.y.z/a", "GreeterPort");
         EasyMock.expect(ei.getName()).andReturn(name);
+        EasyMock.expect(manager.getRMNamespace(message)).andReturn(RM10Constants.NAMESPACE_URI).anyTimes();
+        EasyMock.expect(manager.getAddressingNamespace(message)).andReturn(Names200408.WSA_NAMESPACE_NAME)
+            .anyTimes();
         RMEndpoint rme = control.createMock(RMEndpoint.class);
-        EasyMock.expect(manager.createReliableEndpoint(endpoint, null)).andReturn(rme);
+        EasyMock.expect(manager.createReliableEndpoint(endpoint, ProtocolVariation.RM10WSA200408))
+            .andReturn(rme);
         EasyMock.expect(exchange.getDestination()).andReturn(null);
         Conduit conduit = control.createMock(Conduit.class);
         EasyMock.expect(exchange.getConduit(message)).andReturn(conduit);
@@ -281,6 +299,9 @@ public class RMManagerTest extends Asser
         EasyMock.expect(exchange.get(Endpoint.class)).andReturn(endpoint);
         EasyMock.expect(endpoint.getEndpointInfo()).andReturn(ei);
         EasyMock.expect(ei.getName()).andReturn(name);
+        EasyMock.expect(manager.getRMNamespace(message)).andReturn(RM10Constants.NAMESPACE_URI).anyTimes();
+        EasyMock.expect(manager.getAddressingNamespace(message)).andReturn(Names200408.WSA_NAMESPACE_NAME)
+            .anyTimes();
     
         control.replay();
         assertSame(rme, manager.getReliableEndpoint(message));
@@ -288,12 +309,16 @@ public class RMManagerTest extends Asser
     }
     
     @Test
-    public void testGetReliableEndpointExisting() throws NoSuchMethodException {
-        Method m = RMManager.class.getDeclaredMethod("createReliableEndpoint", 
-            new Class[] {Endpoint.class, EncoderDecoder.class});
-        manager = control.createMock(RMManager.class, new Method[] {m});
-        manager.setReliableEndpointsMap(new HashMap<Endpoint, RMEndpoint>());
+    public void testGetReliableEndpointExisting() throws NoSuchMethodException, RMException {
+        Method m1 = RMManager.class.getDeclaredMethod("createReliableEndpoint", 
+            new Class[] {Endpoint.class, ProtocolVariation.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});
         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)
+            .anyTimes();
         Exchange exchange = control.createMock(Exchange.class);
         EasyMock.expect(message.getExchange()).andReturn(exchange);
         Endpoint endpoint = control.createMock(Endpoint.class);
@@ -303,7 +328,8 @@ 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.getReliableEndpointsMap().put(endpoint, rme);
+        manager.setEndpointMaps(new HashMap<ProtocolVariation, Map<Endpoint, RMEndpoint>>());
+        manager.getEndpointMaps().get(ProtocolVariation.RM10WSA200408).put(endpoint, rme);
 
         control.replay();
         assertSame(rme, manager.getReliableEndpoint(message));
@@ -311,7 +337,7 @@ public class RMManagerTest extends Asser
     }
     
     @Test
-    public void testGetDestination() throws NoSuchMethodException {
+    public void testGetDestination() throws NoSuchMethodException, RMException {
         Method  m = RMManager.class
             .getDeclaredMethod("getReliableEndpoint", new Class[] {Message.class});        
         manager = control.createMock(RMManager.class, new Method[] {m});
@@ -333,7 +359,7 @@ public class RMManagerTest extends Asser
     }
     
     @Test
-    public void testGetSource() throws NoSuchMethodException {
+    public void testGetSource() throws NoSuchMethodException, RMException {
         Method m = RMManager.class
             .getDeclaredMethod("getReliableEndpoint", new Class[] {Message.class});
         manager = control.createMock(RMManager.class, new Method[] {m});
@@ -422,7 +448,7 @@ public class RMManagerTest extends Asser
         manager = bus.getExtension(RMManager.class);        
         Endpoint e = control.createMock(Endpoint.class);
         RMEndpoint rme = control.createMock(RMEndpoint.class);
-        manager.getReliableEndpointsMap().put(e, rme);
+        manager.getEndpointMaps().get(ProtocolVariation.RM10WSA200408).put(e, rme);
         manager.getTimer(); //start the timer
         rme.shutdown();
         EasyMock.expectLastCall();
@@ -452,12 +478,12 @@ public class RMManagerTest extends Asser
         control.verify();
         
         control.reset();
-        manager.getReliableEndpointsMap().put(e, rme);
+        manager.getEndpointMaps().get(ProtocolVariation.RM10WSA200408).put(e, rme);
         rme.shutdown();
         EasyMock.expectLastCall();
         control.replay();
         manager.shutdownReliableEndpoint(e);
-        assertNull(manager.getReliableEndpointsMap().get(e));  
+        assertNull(manager.getEndpointMaps().get(ProtocolVariation.RM10WSA200408).get(e));  
         control.verify();
     }
     
@@ -468,7 +494,7 @@ public class RMManagerTest extends Asser
         Conduit conduit = control.createMock(Conduit.class);
                 
         control.replay();
-        manager.recoverReliableEndpoint(endpoint, conduit);
+        manager.recoverReliableEndpoint(endpoint, conduit, ProtocolVariation.RM10WSA200408);
         control.verify();
         
         control.reset();
@@ -477,14 +503,14 @@ public class RMManagerTest extends Asser
         manager.setStore(store);
        
         control.replay();
-        manager.recoverReliableEndpoint(endpoint, conduit);
+        manager.recoverReliableEndpoint(endpoint, conduit, ProtocolVariation.RM10WSA200408);
         control.verify();           
     }
     
     @Test
     public void testRecoverReliableClientEndpoint() throws NoSuchMethodException {
         Method method = RMManager.class.getDeclaredMethod("createReliableEndpoint", 
-            new Class[] {Endpoint.class, EncoderDecoder.class});
+            new Class[] {Endpoint.class, ProtocolVariation.class});
         manager = control.createMock(RMManager.class, new Method[] {method});
         Endpoint endpoint = control.createMock(Endpoint.class);
         EndpointInfo ei = control.createMock(EndpointInfo.class);
@@ -495,7 +521,7 @@ public class RMManagerTest extends Asser
         Conduit conduit = control.createMock(Conduit.class);        
         setUpRecoverReliableEndpoint(endpoint, conduit, null, null, null);
         control.replay();
-        manager.recoverReliableEndpoint(endpoint, conduit);
+        manager.recoverReliableEndpoint(endpoint, conduit, ProtocolVariation.RM10WSA200408);
         control.verify();
         
         control.reset();
@@ -504,7 +530,7 @@ public class RMManagerTest extends Asser
         DestinationSequence ds = control.createMock(DestinationSequence.class);
         setUpRecoverReliableEndpoint(endpoint, conduit, ss, ds, null);
         control.replay();
-        manager.recoverReliableEndpoint(endpoint, conduit);
+        manager.recoverReliableEndpoint(endpoint, conduit, ProtocolVariation.RM10WSA200408);
         control.verify();
         
         control.reset();
@@ -512,7 +538,7 @@ public class RMManagerTest extends Asser
         RMMessage m = control.createMock(RMMessage.class);
         setUpRecoverReliableEndpoint(endpoint, conduit, ss, ds, m);        
         control.replay();
-        manager.recoverReliableEndpoint(endpoint, conduit);
+        manager.recoverReliableEndpoint(endpoint, conduit, ProtocolVariation.RM10WSA200408);
         control.verify();        
     }
     
@@ -542,7 +568,8 @@ public class RMManagerTest extends Asser
         if (null != ss) {
             sss.add(ss);            
         }
-        EasyMock.expect(store.getSourceSequences("{S}s.{P}p")).andReturn(sss);
+        EasyMock.expect(store.getSourceSequences("{S}s.{P}p", ProtocolVariation.RM10WSA200408))
+            .andReturn(sss);
         if (null == ss) {
             return;
         }         
@@ -551,7 +578,8 @@ public class RMManagerTest extends Asser
         if (null != ds) {
             dss.add(ds);            
         }
-        EasyMock.expect(store.getDestinationSequences("{S}s.{P}p")).andReturn(dss);
+        EasyMock.expect(store.getDestinationSequences("{S}s.{P}p", ProtocolVariation.RM10WSA200408))
+            .andReturn(dss);
         if (null == ds) {
             return;
         }
@@ -565,9 +593,10 @@ public class RMManagerTest extends Asser
         EasyMock.expect(store.getMessages(id, true)).andReturn(ms);
         
         
-        manager.setReliableEndpointsMap(new HashMap<Endpoint, RMEndpoint>());
+        manager.setEndpointMaps(new HashMap<ProtocolVariation, Map<Endpoint, RMEndpoint>>());
         RMEndpoint rme = control.createMock(RMEndpoint.class);
-        EasyMock.expect(manager.createReliableEndpoint(endpoint, null)).andReturn(rme);
+        EasyMock.expect(manager.createReliableEndpoint(endpoint, ProtocolVariation.RM10WSA200408))
+            .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/ServantTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/ServantTest.java?rev=1150554&r1=1150553&r2=1150554&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 Mon Jul 25 05:56:11 2011
@@ -35,10 +35,10 @@ import org.apache.cxf.ws.addressing.Cont
 import org.apache.cxf.ws.addressing.JAXWSAConstants;
 import org.apache.cxf.ws.rm.manager.AcksPolicyType;
 import org.apache.cxf.ws.rm.manager.DestinationPolicyType;
-import org.apache.cxf.ws.rm.v200702.CreateSequenceResponseType;
-import org.apache.cxf.ws.rm.v200702.CreateSequenceType;
-import org.apache.cxf.ws.rm.v200702.Expires;
-import org.apache.cxf.ws.rm.v200702.OfferType;
+import org.apache.cxf.ws.rm.v200502.CreateSequenceResponseType;
+import org.apache.cxf.ws.rm.v200502.CreateSequenceType;
+import org.apache.cxf.ws.rm.v200502.Expires;
+import org.apache.cxf.ws.rm.v200502.OfferType;
 import org.easymock.classextension.EasyMock;
 import org.easymock.classextension.IMocksControl;
 
@@ -83,7 +83,7 @@ public class ServantTest extends Assert 
 
         EasyMock.expect(rme.getDestination()).andReturn(destination).anyTimes();
         EasyMock.expect(rme.getManager()).andReturn(manager).anyTimes();
-        EasyMock.expect(rme.getEncoderDecoder()).andReturn(EncoderDecoder11Impl.INSTANCE).anyTimes();
+        EasyMock.expect(rme.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408).anyTimes();
 
         control.replay();
 
@@ -200,7 +200,8 @@ public class ServantTest extends Assert 
         message.put(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND, maps);
         
         CreateSequenceType cs = new CreateSequenceType();
-        cs.setAcksTo(RMUtils.createReference(DECOUPLED_URL));
+        cs.setAcksTo(org.apache.cxf.ws.addressing.VersionTransformer
+            .convert(RMUtils.createReference(DECOUPLED_URL)));
 
         cs.setExpires(expires);
         cs.setOffer(offer);

Modified: cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/SourceSequenceTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/SourceSequenceTest.java?rev=1150554&r1=1150553&r2=1150554&view=diff
==============================================================================
--- cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/SourceSequenceTest.java (original)
+++ cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/SourceSequenceTest.java Mon Jul 25 05:56:11 2011
@@ -93,7 +93,7 @@ public class SourceSequenceTest extends 
        
         SourceSequence seq = null;
         
-        seq = new SourceSequence(id);
+        seq = new SourceSequence(id, ProtocolVariation.RM10WSA200408);
         assertEquals(id, seq.getIdentifier());
         assertTrue(!seq.isLastMessage());
         assertTrue(!seq.isExpired());
@@ -105,7 +105,7 @@ public class SourceSequenceTest extends 
         
         Date expiry = new Date(System.currentTimeMillis() + 3600 * 1000);
         
-        seq = new SourceSequence(id, expiry, null);
+        seq = new SourceSequence(id, expiry, null, ProtocolVariation.RM10WSA200408);
         assertEquals(id, seq.getIdentifier());
         assertTrue(!seq.isLastMessage());
         assertTrue(!seq.isExpired());
@@ -115,14 +115,14 @@ public class SourceSequenceTest extends 
         assertTrue(!seq.allAcknowledged());
         assertFalse(seq.offeredBy(otherId));
         
-        seq = new SourceSequence(id, expiry, otherId);
+        seq = new SourceSequence(id, expiry, otherId, ProtocolVariation.RM10WSA200408);
         assertTrue(seq.offeredBy(otherId));
         assertFalse(seq.offeredBy(id));
     }
     
     @Test
     public void testSetExpires() {
-        SourceSequence seq = new SourceSequence(id);
+        SourceSequence seq = new SourceSequence(id, ProtocolVariation.RM10WSA200408);
         
         Expires expires = factory.createExpires();
         seq.setExpires(expires);
@@ -151,15 +151,15 @@ public class SourceSequenceTest extends 
 
     @Test
     public void testEqualsAndHashCode() {
-        SourceSequence seq = new SourceSequence(id);
+        SourceSequence seq = new SourceSequence(id, ProtocolVariation.RM10WSA200408);
         SourceSequence otherSeq = null;
         assertTrue(!seq.equals(otherSeq));
-        otherSeq = new SourceSequence(id);
+        otherSeq = new SourceSequence(id, ProtocolVariation.RM10WSA200408);
         assertEquals(seq, otherSeq);
         assertEquals(seq.hashCode(), otherSeq.hashCode());
         Identifier otherId = factory.createIdentifier();
         otherId.setValue("otherSeq");
-        otherSeq = new SourceSequence(otherId);
+        otherSeq = new SourceSequence(otherId, ProtocolVariation.RM10WSA200408);
         assertTrue(!seq.equals(otherSeq));
         assertTrue(seq.hashCode() != otherSeq.hashCode()); 
         assertTrue(!seq.equals(this));
@@ -167,7 +167,7 @@ public class SourceSequenceTest extends 
     
     @Test
     public void testSetAcknowledged() throws RMException {
-        SourceSequence seq = new SourceSequence(id);
+        SourceSequence seq = new SourceSequence(id, ProtocolVariation.RM10WSA200408);
         setUpSource();
         seq.setSource(source);
         
@@ -201,7 +201,7 @@ public class SourceSequenceTest extends 
     @Test
     public void testAllAcknowledged() throws RMException {
         
-        SourceSequence seq = new SourceSequence(id, null, null, 4, false);        
+        SourceSequence seq = new SourceSequence(id, null, null, 4, false, ProtocolVariation.RM10WSA200408);        
         setUpSource();
         seq.setSource(source);
         
@@ -235,14 +235,14 @@ public class SourceSequenceTest extends 
         
         // default termination policy
 
-        seq = new SourceSequence(id);  
+        seq = new SourceSequence(id, ProtocolVariation.RM10WSA200408);  
         seq.setSource(source);
         assertTrue(!nextMessages(seq, 10));
         control.verify();
         
         // termination policy max length = 1
         
-        seq = new SourceSequence(id); 
+        seq = new SourceSequence(id, ProtocolVariation.RM10WSA200408); 
         seq.setSource(source);
         stp.setMaxLength(1);
         assertTrue(nextMessages(seq, 10));
@@ -250,7 +250,7 @@ public class SourceSequenceTest extends 
         control.verify();
         
         // termination policy max length = 5
-        seq = new SourceSequence(id); 
+        seq = new SourceSequence(id, ProtocolVariation.RM10WSA200408); 
         seq.setSource(source);
         stp.setMaxLength(5);
         assertTrue(!nextMessages(seq, 2));
@@ -258,10 +258,10 @@ public class SourceSequenceTest extends 
         
         // termination policy max range exceeded
         
-        seq = new SourceSequence(id); 
+        seq = new SourceSequence(id, ProtocolVariation.RM10WSA200408); 
         seq.setSource(source);
         stp.setMaxLength(0);
-        stp.setMaxRanges(new Integer(3));
+        stp.setMaxRanges(3);
         acknowledge(seq, 1, 2, 4, 5, 6, 8, 9, 10);
         assertTrue(nextMessages(seq, 10));
         assertEquals(1, seq.getCurrentMessageNr());
@@ -269,10 +269,10 @@ public class SourceSequenceTest extends 
         
         // termination policy max range not exceeded
         
-        seq = new SourceSequence(id); 
+        seq = new SourceSequence(id, ProtocolVariation.RM10WSA200408); 
         seq.setSource(source);
         stp.setMaxLength(0);
-        stp.setMaxRanges(new Integer(4));
+        stp.setMaxRanges(4);
         acknowledge(seq, 1, 2, 4, 5, 6, 8, 9, 10);
         assertTrue(!nextMessages(seq, 10));
         control.verify();
@@ -287,7 +287,7 @@ public class SourceSequenceTest extends 
         EasyMock.expect(source.getName()).andReturn(name);
         control.replay();
         
-        SourceSequence seq = new SourceSequence(id);
+        SourceSequence seq = new SourceSequence(id, ProtocolVariation.RM10WSA200408);
         seq.setSource(source);
         assertEquals("Unexpected endpoint identifier", name, seq.getEndpointIdentifier());
         control.verify();
@@ -311,7 +311,7 @@ public class SourceSequenceTest extends 
         
         control.replay();
         
-        seq = new SourceSequence(id, null, did);  
+        seq = new SourceSequence(id, null, did, ProtocolVariation.RM10WSA200408);  
         seq.setSource(source);        
         seq.nextMessageNumber(did, 1, false);
         assertTrue(seq.isLastMessage());

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=1150554&r1=1150553&r2=1150554&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 Mon Jul 25 05:56:11 2011
@@ -31,6 +31,7 @@ import org.apache.cxf.helpers.IOUtils;
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
 import org.apache.cxf.ws.addressing.Names;
 import org.apache.cxf.ws.rm.DestinationSequence;
+import org.apache.cxf.ws.rm.ProtocolVariation;
 import org.apache.cxf.ws.rm.RMUtils;
 import org.apache.cxf.ws.rm.SourceSequence;
 import org.apache.cxf.ws.rm.persistence.RMMessage;
@@ -362,18 +363,19 @@ public class RMTxStoreTest extends Asser
         Identifier sid1 = null;
         Identifier sid2 = null;
         
-        Collection<DestinationSequence> seqs = store.getDestinationSequences("unknown");
+        Collection<DestinationSequence> seqs =
+            store.getDestinationSequences("unknown", ProtocolVariation.RM10WSA200408);
         assertEquals(0, seqs.size());
         
         try {
             sid1 = setupDestinationSequence("sequence1");
 
-            seqs = store.getDestinationSequences(SERVER_ENDPOINT_ID);
+            seqs = store.getDestinationSequences(SERVER_ENDPOINT_ID, ProtocolVariation.RM10WSA200408);
             assertEquals(1, seqs.size());
             checkRecoveredDestinationSequences(seqs);
 
             sid2 = setupDestinationSequence("sequence2");
-            seqs = store.getDestinationSequences(SERVER_ENDPOINT_ID);
+            seqs = store.getDestinationSequences(SERVER_ENDPOINT_ID, ProtocolVariation.RM10WSA200408);
             assertEquals(2, seqs.size());
             checkRecoveredDestinationSequences(seqs);
         } finally {
@@ -392,18 +394,19 @@ public class RMTxStoreTest extends Asser
         Identifier sid1 = null;
         Identifier sid2 = null;
         
-        Collection<SourceSequence> seqs = store.getSourceSequences("unknown");
+        Collection<SourceSequence> seqs =
+            store.getSourceSequences("unknown", ProtocolVariation.RM10WSA200408);
         assertEquals(0, seqs.size());
         
         try {
             sid1 = setupSourceSequence("sequence1");
 
-            seqs = store.getSourceSequences(CLIENT_ENDPOINT_ID);
+            seqs = store.getSourceSequences(CLIENT_ENDPOINT_ID, ProtocolVariation.RM10WSA200408);
             assertEquals(1, seqs.size());
             checkRecoveredSourceSequences(seqs);
 
             sid2 = setupSourceSequence("sequence2");
-            seqs = store.getSourceSequences(CLIENT_ENDPOINT_ID);
+            seqs = store.getSourceSequences(CLIENT_ENDPOINT_ID, ProtocolVariation.RM10WSA200408);
             assertEquals(2, seqs.size());
             checkRecoveredSourceSequences(seqs);
         } finally {
@@ -417,62 +420,6 @@ public class RMTxStoreTest extends Asser
     }
 
     @Test
-    public void testGetDestinationSequence() throws SQLException, IOException {
-        
-        Identifier sid1 = null;
-        Identifier sid2 = null;
-        
-        DestinationSequence seq = store.getDestinationSequence(new Identifier());
-        assertNull(seq);
-
-        try {
-            sid1 = setupDestinationSequence("sequence1");
-
-            seq = store.getDestinationSequence(sid1);
-            assertNotNull(seq);
-
-            sid2 = setupDestinationSequence("sequence2");
-            seq = store.getDestinationSequence(sid2);
-            assertNotNull(seq);
-        } finally {
-            if (null != sid1) {
-                store.removeDestinationSequence(sid1);
-            }
-            if (null != sid2) {
-                store.removeDestinationSequence(sid2);
-            }
-        }
-    }
-
-    @Test
-    public void testGetSourceSequence() throws SQLException {
-        
-        Identifier sid1 = null;
-        Identifier sid2 = null;
-        
-        SourceSequence seq = store.getSourceSequence(new Identifier());
-        assertNull(seq);
-        
-        try {
-            sid1 = setupSourceSequence("sequence1");
-
-            seq = store.getSourceSequence(sid1);
-            assertNotNull(seq);
-
-            sid2 = setupSourceSequence("sequence2");
-            seq = store.getSourceSequence(sid2);
-            assertNotNull(seq);
-        } finally {
-            if (null != sid1) {
-                store.removeSourceSequence(sid1);
-            }
-            if (null != sid2) {
-                store.removeSourceSequence(sid2);
-            }
-        }
-    }
-
-    @Test
     public void testGetMessages() throws SQLException, IOException {
         
         Identifier sid1 = new Identifier();

Modified: cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/rm/ClientPersistenceTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/rm/ClientPersistenceTest.java?rev=1150554&r1=1150553&r2=1150554&view=diff
==============================================================================
--- cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/rm/ClientPersistenceTest.java (original)
+++ cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/rm/ClientPersistenceTest.java Mon Jul 25 05:56:11 2011
@@ -46,6 +46,7 @@ import org.apache.cxf.testutil.common.Ab
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
 import org.apache.cxf.ws.addressing.VersionTransformer.Names200408;
 import org.apache.cxf.ws.rm.DestinationSequence;
+import org.apache.cxf.ws.rm.ProtocolVariation;
 import org.apache.cxf.ws.rm.RM10Constants;
 import org.apache.cxf.ws.rm.RMManager;
 import org.apache.cxf.ws.rm.RMUtils;
@@ -217,11 +218,11 @@ public class ClientPersistenceTest exten
         String id = RMUtils.getEndpointIdentifier(client.getEndpoint());
         
         Collection<DestinationSequence> dss =
-            store.getDestinationSequences(id);
+            store.getDestinationSequences(id, ProtocolVariation.RM10WSA200408);
         assertEquals(1, dss.size());
         
         Collection<SourceSequence> sss =
-            store.getSourceSequences(id);
+            store.getSourceSequences(id, ProtocolVariation.RM10WSA200408);
         assertEquals(1, sss.size());
         
         Collection<RMMessage> msgs = 
@@ -293,11 +294,11 @@ public class ClientPersistenceTest exten
         String id = RMUtils.getEndpointIdentifier(client.getEndpoint());
         
         Collection<DestinationSequence> dss =
-            store.getDestinationSequences(id);
+            store.getDestinationSequences(id, ProtocolVariation.RM10WSA200408);
         assertEquals(1, dss.size());
         
         Collection<SourceSequence> sss =
-            store.getSourceSequences(id);
+            store.getSourceSequences(id, ProtocolVariation.RM10WSA200408);
         assertEquals(1, sss.size());
         
         int i = 0;



Mime
View raw message