This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch 3.1.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit 4fe93ce2e2e31fe794436e1cb339d1f9bf41ef6a
Author: Colm O hEigeartaigh <cohei...@apache.org>
AuthorDate: Wed Feb 7 18:25:55 2018 +0000

    Adding WS-Security dispatch tests
    
    (cherry picked from commit 5d67785208334062a950dc7f85ffcb7d52af3db5)
    
    # Conflicts:
    #   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/action/ActionTest.java
    #   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/action/SignatureWhitespaceTest.java
    #   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/algsuite/AlgorithmSuiteTest.java
    #   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/algsuite/StaxAlgorithmSuiteTest.java
    #   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/bindings/BindingPropertiesTest.java
    #   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/cache/CachingTest.java
    #   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/coverage_checker/CryptoCoverageCheckerTest.java
    #   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/FaultTest.java
    #   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/gcm/GCMTest.java
    #   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/https/HttpsTokenTest.java
    #   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/parts/PartsTest.java
    #   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/BinarySecurityTokenTest.java
    #   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/EndorsingSupportingTokenTest.java
    #   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/SupportingTokenTest.java
    #   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ut/UsernameTokenDerivedTest.java
    #   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ut/UsernameTokenPolicyTest.java
    #   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ut/UsernameTokenTest.java
    #   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCUnitTest.java
    #   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/X509TokenTest.java
    #   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/xkms/XKMSTest.java
---
 .../apache/cxf/systest/ws/action/ActionTest.java   | 166 +++++++++++--
 .../systest/ws/action/SignatureWhitespaceTest.java |  19 +-
 .../systest/ws/algsuite/AlgorithmSuiteTest.java    |  42 ++--
 .../ws/algsuite/StaxAlgorithmSuiteTest.java        |  10 +-
 .../cxf/systest/ws/basicauth/BasicAuthTest.java    |  10 +-
 .../systest/ws/bindings/BindingPropertiesTest.java |  50 ++--
 .../apache/cxf/systest/ws/cache/CachingTest.java   |  12 +-
 .../CryptoCoverageCheckerTest.java                 |  36 +--
 .../org/apache/cxf/systest/ws/fault/FaultTest.java |  22 +-
 .../org/apache/cxf/systest/ws/gcm/GCMTest.java     |  27 ++-
 .../cxf/systest/ws/https/HttpsTokenTest.java       |  16 +-
 .../org/apache/cxf/systest/ws/parts/PartsTest.java |  48 ++--
 .../systest/ws/tokens/BinarySecurityTokenTest.java |   6 +-
 .../ws/tokens/EndorsingSupportingTokenTest.java    |  12 +-
 .../cxf/systest/ws/tokens/SupportingTokenTest.java |  24 +-
 .../systest/ws/ut/UsernameTokenDerivedTest.java    |  42 ++--
 .../cxf/systest/ws/ut/UsernameTokenPolicyTest.java |  30 +--
 .../cxf/systest/ws/ut/UsernameTokenTest.java       |  64 ++---
 .../apache/cxf/systest/ws/wssc/WSSCUnitTest.java   |  12 +-
 .../apache/cxf/systest/ws/x509/X509TokenTest.java  | 258 ++++++++++-----------
 .../org/apache/cxf/systest/ws/xkms/XKMSTest.java   |  12 +-
 .../cxf/systest/ws/action/DoubleItAction.wsdl      |   3 +
 .../org/apache/cxf/systest/ws/action/server.xml    |  13 ++
 23 files changed, 548 insertions(+), 386 deletions(-)

diff --git 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/action/ActionTest.java
 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/action/ActionTest.java
index cab2667..6cd6b43 100644
--- 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/action/ActionTest.java
+++ 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/action/ActionTest.java
@@ -19,18 +19,30 @@
 
 package org.apache.cxf.systest.ws.action;
 
+import java.io.StringReader;
 import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
 
 import javax.xml.namespace.QName;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.ws.Dispatch;
 import javax.xml.ws.Service;
 
+import org.w3c.dom.Document;
+
 import org.apache.cxf.Bus;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.endpoint.Client;
 import org.apache.cxf.frontend.ClientProxy;
+import org.apache.cxf.jaxws.DispatchImpl;
+import org.apache.cxf.staxutils.StaxUtils;
+import org.apache.cxf.systest.ws.common.KeystorePasswordCallback;
 import org.apache.cxf.systest.ws.common.SecurityTestUtil;
 import org.apache.cxf.systest.ws.ut.SecurityHeaderCacheInterceptor;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor;
+import org.apache.wss4j.common.ConfigurationConstants;
 import org.apache.wss4j.common.ext.WSSecurityException;
 import org.example.contract.doubleit.DoubleItPortType;
 
@@ -86,8 +98,8 @@ public class ActionTest extends 
AbstractBusClientServerTestBase {
         DoubleItPortType port = 
                 service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(port, PORT);
-        port.doubleIt(25);
-        
+        assertEquals(50, port.doubleIt(25));
+
         ((java.io.Closeable)port).close();
         bus.shutdown(true);
     }
@@ -110,8 +122,8 @@ public class ActionTest extends 
AbstractBusClientServerTestBase {
         updateAddressPort(port, PORT);
 
         // Successful call
-        port.doubleIt(25);
-        
+        assertEquals(50, port.doubleIt(25));
+
         // This should fail, as the client is not sending a UsernameToken
         portQName = new QName(NAMESPACE, "DoubleItUsernameTokenPort2");
         port = service.getPort(portQName, DoubleItPortType.class);
@@ -129,7 +141,7 @@ public class ActionTest extends 
AbstractBusClientServerTestBase {
         port = service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(port, UTServer.PORT);
 
-        port.doubleIt(25);
+        assertEquals(50, port.doubleIt(25));
 
         ((java.io.Closeable)port).close();
         bus.shutdown(true);
@@ -158,7 +170,7 @@ public class ActionTest extends 
AbstractBusClientServerTestBase {
         cxfClient.getOutInterceptors().add(cacheInterceptor);
         
         // Make two invocations with the same UsernameToken
-        port.doubleIt(25);
+        assertEquals(50, port.doubleIt(25));
         try {
             port.doubleIt(25);
             fail("Failure expected on a replayed UsernameToken");
@@ -190,8 +202,8 @@ public class ActionTest extends 
AbstractBusClientServerTestBase {
         DoubleItPortType port = 
                 service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(port, PORT);
-        port.doubleIt(25);
-        
+        assertEquals(50, port.doubleIt(25));
+
         ((java.io.Closeable)port).close();
         bus.shutdown(true);
     }
@@ -219,7 +231,7 @@ public class ActionTest extends 
AbstractBusClientServerTestBase {
         cxfClient.getOutInterceptors().add(cacheInterceptor);
         
         // Make two invocations with the same SecurityHeader
-        port.doubleIt(25);
+        assertEquals(50, port.doubleIt(25));
         try {
             port.doubleIt(25);
             fail("Failure expected on a replayed Timestamp");
@@ -250,8 +262,8 @@ public class ActionTest extends 
AbstractBusClientServerTestBase {
         updateAddressPort(port, PORT);
         
         // Successful call
-        port.doubleIt(25);
-        
+        assertEquals(50, port.doubleIt(25));
+
         ((java.io.Closeable)port).close();
         bus.shutdown(true);
     }
@@ -275,8 +287,8 @@ public class ActionTest extends 
AbstractBusClientServerTestBase {
         updateAddressPort(port, PORT);
         
         // Successful call
-        port.doubleIt(25);
-        
+        assertEquals(50, port.doubleIt(25));
+
         ((java.io.Closeable)port).close();
         bus.shutdown(true);
     }
@@ -299,8 +311,8 @@ public class ActionTest extends 
AbstractBusClientServerTestBase {
         updateAddressPort(port, PORT);
         
         // Successful call
-        port.doubleIt(25);
-        
+        assertEquals(50, port.doubleIt(25));
+
         ((java.io.Closeable)port).close();
         bus.shutdown(true);
     }
@@ -433,10 +445,132 @@ public class ActionTest extends 
AbstractBusClientServerTestBase {
         DoubleItPortType port =
                 service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(port, PORT);
-        port.doubleIt(25);
+        assertEquals(50, port.doubleIt(25));
 
         ((java.io.Closeable)port).close();
         bus.shutdown(true);
     }
 
+    @org.junit.Test
+    public void testSignatureProgrammatic() throws Exception {
+
+        SpringBusFactory bf = new SpringBusFactory();
+        URL busFile = ActionTest.class.getResource("client.xml");
+
+        Bus bus = bf.createBus(busFile.toString());
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
+
+        URL wsdl = ActionTest.class.getResource("DoubleItAction.wsdl");
+        Service service = Service.create(wsdl, SERVICE_QNAME);
+        QName portQName = new QName(NAMESPACE, "DoubleItSignatureConfigPort");
+
+        DoubleItPortType port =
+                service.getPort(portQName, DoubleItPortType.class);
+        updateAddressPort(port, PORT);
+
+        // Programmatic interceptor
+        Map<String, Object> props = new HashMap<>();
+        props.put(ConfigurationConstants.ACTION, "Signature");
+        props.put(ConfigurationConstants.SIGNATURE_USER, "alice");
+        props.put(ConfigurationConstants.PW_CALLBACK_REF, new 
KeystorePasswordCallback());
+        props.put(ConfigurationConstants.SIG_KEY_ID, "DirectReference");
+        props.put(ConfigurationConstants.SIG_PROP_FILE, "alice.properties");
+        WSS4JOutInterceptor outInterceptor = new WSS4JOutInterceptor(props);
+        Client client = ClientProxy.getClient(port);
+        client.getOutInterceptors().add(outInterceptor);
+
+        assertEquals(50, port.doubleIt(25));
+
+        ((java.io.Closeable)port).close();
+        bus.shutdown(true);
+    }
+
+    @org.junit.Test
+    public void testSignatureDispatchPayload() throws Exception {
+
+        SpringBusFactory bf = new SpringBusFactory();
+        URL busFile = ActionTest.class.getResource("client.xml");
+
+        Bus bus = bf.createBus(busFile.toString());
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
+
+        URL wsdl = ActionTest.class.getResource("DoubleItAction.wsdl");
+        Service service = Service.create(wsdl, SERVICE_QNAME);
+        QName portQName = new QName(NAMESPACE, "DoubleItSignatureConfigPort");
+
+        Dispatch<StreamSource> dispatch =
+            service.createDispatch(portQName, StreamSource.class, 
Service.Mode.PAYLOAD);
+        updateAddressPort(dispatch, PORT);
+
+        // Programmatic interceptor
+        Map<String, Object> props = new HashMap<>();
+        props.put(ConfigurationConstants.ACTION, "Signature");
+        props.put(ConfigurationConstants.SIGNATURE_USER, "alice");
+        props.put(ConfigurationConstants.PW_CALLBACK_REF, new 
KeystorePasswordCallback());
+        props.put(ConfigurationConstants.SIG_KEY_ID, "DirectReference");
+        props.put(ConfigurationConstants.SIG_PROP_FILE, "alice.properties");
+        WSS4JOutInterceptor outInterceptor = new WSS4JOutInterceptor(props);
+        Client client = ((DispatchImpl<StreamSource>) dispatch).getClient();
+        client.getOutInterceptors().add(outInterceptor);
+
+        String payload = "<ns2:DoubleIt 
xmlns:ns2=\"http://www.example.org/schema/DoubleIt\";>"
+            + "<numberToDouble>25</numberToDouble></ns2:DoubleIt>";
+        StreamSource request = new StreamSource(new StringReader(payload));
+        StreamSource response = dispatch.invoke(request);
+        assertNotNull(response);
+
+        Document doc = StaxUtils.read(response.getInputStream());
+        assertEquals("50", doc.getElementsByTagNameNS(null, 
"doubledNumber").item(0).getTextContent());
+
+        ((java.io.Closeable)dispatch).close();
+        bus.shutdown(true);
+    }
+
+    @org.junit.Test
+    public void testSignatureDispatchMessage() throws Exception {
+
+        SpringBusFactory bf = new SpringBusFactory();
+        URL busFile = ActionTest.class.getResource("client.xml");
+
+        Bus bus = bf.createBus(busFile.toString());
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
+
+        URL wsdl = ActionTest.class.getResource("DoubleItAction.wsdl");
+        Service service = Service.create(wsdl, SERVICE_QNAME);
+        QName portQName = new QName(NAMESPACE, "DoubleItSignatureConfigPort");
+
+        Dispatch<StreamSource> dispatch =
+            service.createDispatch(portQName, StreamSource.class, 
Service.Mode.MESSAGE);
+        updateAddressPort(dispatch, PORT);
+
+        // Programmatic interceptor
+        Map<String, Object> props = new HashMap<>();
+        props.put(ConfigurationConstants.ACTION, "Signature");
+        props.put(ConfigurationConstants.SIGNATURE_USER, "alice");
+        props.put(ConfigurationConstants.PW_CALLBACK_REF, new 
KeystorePasswordCallback());
+        props.put(ConfigurationConstants.SIG_KEY_ID, "DirectReference");
+        props.put(ConfigurationConstants.SIG_PROP_FILE, "alice.properties");
+        WSS4JOutInterceptor outInterceptor = new WSS4JOutInterceptor(props);
+        Client client = ((DispatchImpl<StreamSource>) dispatch).getClient();
+        client.getOutInterceptors().add(outInterceptor);
+
+        String payload = "<soap:Envelope 
xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\";>"
+            + "<soap:Header></soap:Header><soap:Body>"
+            + "<ns2:DoubleIt 
xmlns:ns2=\"http://www.example.org/schema/DoubleIt\";>"
+            + "<numberToDouble>25</numberToDouble></ns2:DoubleIt>"
+            + "</soap:Body></soap:Envelope>";
+        StreamSource request = new StreamSource(new StringReader(payload));
+        StreamSource response = dispatch.invoke(request);
+        assertNotNull(response);
+
+        Document doc = StaxUtils.read(response.getInputStream());
+        assertEquals("50", doc.getElementsByTagNameNS(null, 
"doubledNumber").item(0).getTextContent());
+
+        ((java.io.Closeable)dispatch).close();
+        bus.shutdown(true);
+    }
+
 }
diff --git 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/action/SignatureWhitespaceTest.java
 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/action/SignatureWhitespaceTest.java
index 91d5904..549b548 100644
--- 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/action/SignatureWhitespaceTest.java
+++ 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/action/SignatureWhitespaceTest.java
@@ -29,10 +29,13 @@ import javax.xml.transform.stream.StreamSource;
 import javax.xml.ws.Dispatch;
 import javax.xml.ws.Service;
 
+import org.w3c.dom.Document;
+
 import org.apache.cxf.Bus;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.endpoint.Client;
 import org.apache.cxf.jaxws.DispatchImpl;
+import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.cxf.systest.ws.common.SecurityTestUtil;
 import org.apache.cxf.systest.ws.common.TestParam;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -107,9 +110,9 @@ public class SignatureWhitespaceTest extends 
AbstractBusClientServerTestBase {
         DoubleItPortType port = 
                 service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(port, test.getPort());
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         ((java.io.Closeable)port).close();
         bus.shutdown(true);
     }
@@ -153,6 +156,11 @@ public class SignatureWhitespaceTest extends 
AbstractBusClientServerTestBase {
         // Make a successful request
         StreamSource response = dispatch.invoke(request);
         assertNotNull(response);
+
+        Document doc = StaxUtils.read(response.getInputStream());
+        assertEquals("50", doc.getElementsByTagNameNS(null, 
"doubledNumber").item(0).getTextContent());
+
+        ((java.io.Closeable)dispatch).close();
     }
     
     @org.junit.Test
@@ -184,6 +192,11 @@ public class SignatureWhitespaceTest extends 
AbstractBusClientServerTestBase {
         // Make a successful request
         StreamSource response = dispatch.invoke(request);
         assertNotNull(response);
+
+        Document doc = StaxUtils.read(response.getInputStream());
+        assertEquals("50", doc.getElementsByTagNameNS(null, 
"doubledNumber").item(0).getTextContent());
+
+        ((java.io.Closeable)dispatch).close();
     }
     
 }
diff --git 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/algsuite/AlgorithmSuiteTest.java
 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/algsuite/AlgorithmSuiteTest.java
index 7109780..9aed8e5 100644
--- 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/algsuite/AlgorithmSuiteTest.java
+++ 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/algsuite/AlgorithmSuiteTest.java
@@ -79,12 +79,12 @@ public class AlgorithmSuiteTest extends 
AbstractBusClientServerTestBase {
         
         // This should succeed as the client + server policies match
         // DOM
-        port.doubleIt(25);
-        
+        assertEquals(50, port.doubleIt(25));
+
         // Streaming
         SecurityTestUtil.enableStreaming(port);
-        port.doubleIt(25);
-        
+        assertEquals(50, port.doubleIt(25));
+
         portQName = new QName(NAMESPACE, "DoubleItSymmetric128Port2");
         port = service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(port, PORT);
@@ -160,12 +160,12 @@ public class AlgorithmSuiteTest extends 
AbstractBusClientServerTestBase {
         updateAddressPort(port, PORT);
 
         // DOM
-        port.doubleIt(25);
-        
+        assertEquals(50, port.doubleIt(25));
+
         // Streaming
         SecurityTestUtil.enableStreaming(port);
-        port.doubleIt(25);
-        
+        assertEquals(50, port.doubleIt(25));
+
         bus.shutdown(true);
     }
     
@@ -187,8 +187,8 @@ public class AlgorithmSuiteTest extends 
AbstractBusClientServerTestBase {
         updateAddressPort(port, PORT);
         
         // This should succeed as the client + server settings match
-        port.doubleIt(25);
-        
+        assertEquals(50, port.doubleIt(25));
+
         portQName = new QName(NAMESPACE, "DoubleItEncryptionOAEPPort2");
         port = service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(port, PORT);
@@ -237,8 +237,8 @@ public class AlgorithmSuiteTest extends 
AbstractBusClientServerTestBase {
         updateAddressPort(port, PORT);
         
         // This should succeed as the client + server settings match
-        port.doubleIt(25);
-        
+        assertEquals(50, port.doubleIt(25));
+
         // This should fail as the client uses uses RSA-SHA256 + the server 
uses RSA-SHA1
         if (SecurityTestUtil.checkUnrestrictedPoliciesInstalled()) {
             portQName = new QName(NAMESPACE, "DoubleItSignaturePort2");
@@ -277,12 +277,12 @@ public class AlgorithmSuiteTest extends 
AbstractBusClientServerTestBase {
         
         // This should succeed as the client + server policies match
         // DOM
-        port.doubleIt(25);
-        
+        assertEquals(50, port.doubleIt(25));
+
         // Streaming
         SecurityTestUtil.enableStreaming(port);
-        port.doubleIt(25);
-        
+        assertEquals(50, port.doubleIt(25));
+
         portQName = new QName(NAMESPACE, "DoubleItSymmetric128InclusivePort2");
         port = service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(port, PORT);
@@ -331,12 +331,12 @@ public class AlgorithmSuiteTest extends 
AbstractBusClientServerTestBase {
         updateAddressPort(port, PORT);
 
         // DOM
-        port.doubleIt(25);
-        
+        assertEquals(50, port.doubleIt(25));
+
         // Streaming
         SecurityTestUtil.enableStreaming(port);
-        port.doubleIt(25);
-        
+        assertEquals(50, port.doubleIt(25));
+
         bus.shutdown(true);
     }
-}
\ No newline at end of file
+}
diff --git 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/algsuite/StaxAlgorithmSuiteTest.java
 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/algsuite/StaxAlgorithmSuiteTest.java
index 5d87ff9..3f55ca5 100644
--- 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/algsuite/StaxAlgorithmSuiteTest.java
+++ 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/algsuite/StaxAlgorithmSuiteTest.java
@@ -79,12 +79,12 @@ public class StaxAlgorithmSuiteTest extends 
AbstractBusClientServerTestBase {
         
         // This should succeed as the client + server policies match
         // DOM
-        port.doubleIt(25);
-        
+        assertEquals(50, port.doubleIt(25));
+
         // Streaming
         SecurityTestUtil.enableStreaming(port);
-        port.doubleIt(25);
-        
+        assertEquals(50, port.doubleIt(25));
+
         portQName = new QName(NAMESPACE, "DoubleItSymmetric128Port2");
         port = service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(port, PORT);
@@ -136,4 +136,4 @@ public class StaxAlgorithmSuiteTest extends 
AbstractBusClientServerTestBase {
         bus.shutdown(true);
     }
     
-}
\ No newline at end of file
+}
diff --git 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/basicauth/BasicAuthTest.java
 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/basicauth/BasicAuthTest.java
index cb596c1..0dceda6 100644
--- 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/basicauth/BasicAuthTest.java
+++ 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/basicauth/BasicAuthTest.java
@@ -33,8 +33,8 @@ import org.example.contract.doubleit.DoubleItPortType;
 import org.junit.BeforeClass;
 
 /**
- * A test for Basic Auth using the WS-SecurityPolicy HttpBasicAuthentication 
policy. 
- * Note the basic auth credentials are not actually authenticated in this 
test...we are testing 
+ * A test for Basic Auth using the WS-SecurityPolicy HttpBasicAuthentication 
policy.
+ * Note the basic auth credentials are not actually authenticated in this 
test...we are testing
  * the WS-SecurityPolicy enforcement of whether the credentials are present or 
not.
  */
 public class BasicAuthTest extends AbstractBusClientServerTestBase {
@@ -76,12 +76,12 @@ public class BasicAuthTest extends 
AbstractBusClientServerTestBase {
                 service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(utPort, PORT);
 
-        utPort.doubleIt(25);
+        assertEquals(50, utPort.doubleIt(25));
 
         ((java.io.Closeable)utPort).close();
         bus.shutdown(true);
     }
-    
+
     @org.junit.Test
     public void testNoBasicAuthCredentials() throws Exception {
 
@@ -109,5 +109,5 @@ public class BasicAuthTest extends 
AbstractBusClientServerTestBase {
         ((java.io.Closeable)utPort).close();
         bus.shutdown(true);
     }
-    
+
 }
\ No newline at end of file
diff --git 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/bindings/BindingPropertiesTest.java
 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/bindings/BindingPropertiesTest.java
index dca8b32..035747f 100644
--- 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/bindings/BindingPropertiesTest.java
+++ 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/bindings/BindingPropertiesTest.java
@@ -108,9 +108,9 @@ public class BindingPropertiesTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(port);
         }
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         // This should fail, as OnlySignEntireHeadersAndBody is specified
         portQName = new QName(NAMESPACE, "DoubleItOnlySignPort");
         port = service.getPort(portQName, DoubleItPortType.class);
@@ -153,9 +153,9 @@ public class BindingPropertiesTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(port);
         }
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         // This should fail, as the client is not encrypting the signature is 
specified
         portQName = new QName(NAMESPACE, "DoubleItEncryptSignaturePort2");
         port = service.getPort(portQName, DoubleItPortType.class);
@@ -199,9 +199,9 @@ public class BindingPropertiesTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(port);
         }
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         // This should fail, as the client is not sending a Timestamp
         portQName = new QName(NAMESPACE, "DoubleItIncludeTimestampPort2");
         port = service.getPort(portQName, DoubleItPortType.class);
@@ -245,9 +245,9 @@ public class BindingPropertiesTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(port);
         }
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         // This should fail, as the client is not following the correct steps 
for this property
         portQName = new QName(NAMESPACE, "DoubleItEncryptBeforeSigningPort2");
         port = service.getPort(portQName, DoubleItPortType.class);
@@ -291,9 +291,9 @@ public class BindingPropertiesTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(port);
         }
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         // This should fail, as the client is not following the correct steps 
for this property
         portQName = new QName(NAMESPACE, "DoubleItSignBeforeEncryptingPort2");
         port = service.getPort(portQName, DoubleItPortType.class);
@@ -341,7 +341,7 @@ public class BindingPropertiesTest extends 
AbstractBusClientServerTestBase {
         
         // TODO Timestamp First/Last validation not working - see WSS-444
         if (!STAX_PORT.equals(test.getPort())) {
-            port.doubleIt(25);
+            assertEquals(50, port.doubleIt(25));
         }
         
         // This should fail, as the client is sending the timestamp last
@@ -392,7 +392,7 @@ public class BindingPropertiesTest extends 
AbstractBusClientServerTestBase {
         
         // TODO Timestamp First/Last validation not working - see WSS-444
         if (!STAX_PORT.equals(test.getPort())) {
-            port.doubleIt(25);
+            assertEquals(50, port.doubleIt(25));
         }
         
         // This should fail, as the client is sending the timestamp first
@@ -443,7 +443,7 @@ public class BindingPropertiesTest extends 
AbstractBusClientServerTestBase {
 
         // TODO Strict validation not working - see WSS-444
         if (!STAX_PORT.equals(test.getPort())) {
-            port.doubleIt(25);
+            assertEquals(50, port.doubleIt(25));
         }
         
         // This should fail, as the client is sending the timestamp last
@@ -494,7 +494,7 @@ public class BindingPropertiesTest extends 
AbstractBusClientServerTestBase {
         
         // TODO DOM server not working
         if (!PORT.equals(test.getPort())) {
-            port.doubleIt(25);
+            assertEquals(50, port.doubleIt(25));
         }
         
         // This should fail, as the property is not enabled
@@ -543,9 +543,9 @@ public class BindingPropertiesTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(port);
         }
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         // This should fail, as SignatureConfirmation is not enabled
         portQName = new QName(NAMESPACE, "DoubleItSignatureConfirmationPort2");
         port = service.getPort(portQName, DoubleItPortType.class);
@@ -586,9 +586,9 @@ public class BindingPropertiesTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(port);
         }
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         ((java.io.Closeable)port).close();
         bus.shutdown(true);
     }
diff --git 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/cache/CachingTest.java
 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/cache/CachingTest.java
index f9c415b..aefba3d 100644
--- 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/cache/CachingTest.java
+++ 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/cache/CachingTest.java
@@ -104,8 +104,8 @@ public class CachingTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(port);
         }
-        
-        port.doubleIt(25);
+
+        assertEquals(50, port.doubleIt(25));
 
         Client client = ClientProxy.getClient(port);
         TokenStore tokenStore = 
@@ -175,8 +175,8 @@ public class CachingTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(port);
         }
-        
-        port.doubleIt(25);
+
+        assertEquals(50, port.doubleIt(25));
 
         Client client = ClientProxy.getClient(port);
         TokenStore tokenStore = 
@@ -201,8 +201,8 @@ public class CachingTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(port2);
         }
-        
-        port2.doubleIt(35);
+
+        assertEquals(70, port2.doubleIt(35));
 
         client = ClientProxy.getClient(port2);
         tokenStore = 
diff --git 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/coverage_checker/CryptoCoverageCheckerTest.java
 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/coverage_checker/CryptoCoverageCheckerTest.java
index 8539f29..b5d8e5b 100644
--- 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/coverage_checker/CryptoCoverageCheckerTest.java
+++ 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/coverage_checker/CryptoCoverageCheckerTest.java
@@ -135,9 +135,9 @@ public class CryptoCoverageCheckerTest extends 
AbstractBusClientServerTestBase {
             WSS4JOutInterceptor outInterceptor = new 
WSS4JOutInterceptor(outProps);
             bus.getOutInterceptors().add(outInterceptor);
         }
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         ((java.io.Closeable)port).close();
         bus.shutdown(true);
     }
@@ -277,9 +277,9 @@ public class CryptoCoverageCheckerTest extends 
AbstractBusClientServerTestBase {
             WSS4JOutInterceptor outInterceptor = new 
WSS4JOutInterceptor(outProps);
             bus.getOutInterceptors().add(outInterceptor);
         }
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         ((java.io.Closeable)port).close();
         bus.shutdown(true);
     }
@@ -426,8 +426,8 @@ public class CryptoCoverageCheckerTest extends 
AbstractBusClientServerTestBase {
             bus.getOutInterceptors().add(outInterceptor);
         }
 
-        port.doubleIt(25);
-        
+        assertEquals(50, port.doubleIt(25));
+
         ((java.io.Closeable)port).close();
         bus.shutdown(true);
     }
@@ -554,9 +554,9 @@ public class CryptoCoverageCheckerTest extends 
AbstractBusClientServerTestBase {
             outInterceptor = new WSS4JOutInterceptor(outProps);
             bus.getOutInterceptors().add(outInterceptor);
         }
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         ((java.io.Closeable)port).close();
         bus.shutdown(true);
     }
@@ -602,9 +602,9 @@ public class CryptoCoverageCheckerTest extends 
AbstractBusClientServerTestBase {
             outInterceptor = new WSS4JOutInterceptor(outProps);
             bus.getOutInterceptors().add(outInterceptor);
         }
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         ((java.io.Closeable)port).close();
         bus.shutdown(true);
     }
@@ -666,8 +666,8 @@ public class CryptoCoverageCheckerTest extends 
AbstractBusClientServerTestBase {
         
         // This test only applies to the DOM implementation
         if (PORT.equals(test.getPort()) && !test.isStreaming()) {
-            port.doubleIt(25);
-            
+            assertEquals(50, port.doubleIt(25));
+
             // Now try with a message that will create a Fault in the SEI
             try {
                 port.doubleIt(0);
@@ -724,8 +724,8 @@ public class CryptoCoverageCheckerTest extends 
AbstractBusClientServerTestBase {
             bus.getOutInterceptors().add(outInterceptor);
         }
 
-        port.doubleIt(25);
-        
+        assertEquals(50, port.doubleIt(25));
+
         ((java.io.Closeable)port).close();
         bus.shutdown(true);
     }
diff --git 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/FaultTest.java
 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/FaultTest.java
index 1bc82d0..5bdd040 100644
--- 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/FaultTest.java
+++ 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/FaultTest.java
@@ -89,8 +89,8 @@ public class FaultTest extends 
AbstractBusClientServerTestBase {
         
         // Make a successful invocation
         
((BindingProvider)utPort).getRequestContext().put(SecurityConstants.USERNAME, 
"alice");
-        utPort.doubleIt(25);
-        
+        assertEquals(50, utPort.doubleIt(25));
+
         // Now make an invocation using another username
         
((BindingProvider)utPort).getRequestContext().put(SecurityConstants.USERNAME, 
"bob");
         ((BindingProvider)utPort).getRequestContext().put("security.password", 
"password");
@@ -106,7 +106,7 @@ public class FaultTest extends 
AbstractBusClientServerTestBase {
 
         // Make a successful invocation
         
((BindingProvider)utPort).getRequestContext().put(SecurityConstants.USERNAME, 
"alice");
-        utPort.doubleIt(25);
+        assertEquals(50, utPort.doubleIt(25));
 
         // Now make an invocation using another username
         
((BindingProvider)utPort).getRequestContext().put(SecurityConstants.USERNAME, 
"bob");
@@ -140,8 +140,8 @@ public class FaultTest extends 
AbstractBusClientServerTestBase {
         
         // Make a successful invocation
         
((BindingProvider)utPort).getRequestContext().put(SecurityConstants.USERNAME, 
"alice");
-        utPort.doubleIt(25);
-        
+        assertEquals(50, utPort.doubleIt(25));
+
         // Now make an invocation using another username
         
((BindingProvider)utPort).getRequestContext().put(SecurityConstants.USERNAME, 
"bob");
         ((BindingProvider)utPort).getRequestContext().put("security.password", 
"password");
@@ -173,8 +173,8 @@ public class FaultTest extends 
AbstractBusClientServerTestBase {
         
         // Make a successful invocation
         
((BindingProvider)utPort).getRequestContext().put(SecurityConstants.USERNAME, 
"alice");
-        utPort.doubleIt(25);
-        
+        assertEquals(50, utPort.doubleIt(25));
+
         // Now make an invocation using another username
         
((BindingProvider)utPort).getRequestContext().put(SecurityConstants.USERNAME, 
"bob");
         ((BindingProvider)utPort).getRequestContext().put("security.password", 
"password");
@@ -263,8 +263,8 @@ public class FaultTest extends 
AbstractBusClientServerTestBase {
         
         // Make a successful invocation
         
((BindingProvider)utPort).getRequestContext().put(SecurityConstants.USERNAME, 
"alice");
-        utPort.doubleIt(25);
-        
+        assertEquals(50, utPort.doubleIt(25));
+
         // Now make an invocation using another username
         
((BindingProvider)utPort).getRequestContext().put(SecurityConstants.USERNAME, 
"bob");
         ((BindingProvider)utPort).getRequestContext().put("security.password", 
"password");
@@ -299,8 +299,8 @@ public class FaultTest extends 
AbstractBusClientServerTestBase {
         
         // Make a successful invocation
         
((BindingProvider)utPort).getRequestContext().put(SecurityConstants.USERNAME, 
"alice");
-        utPort.doubleIt(25);
-        
+        assertEquals(50, utPort.doubleIt(25));
+
         // Now make an invocation using another username
         
((BindingProvider)utPort).getRequestContext().put(SecurityConstants.USERNAME, 
"bob");
         ((BindingProvider)utPort).getRequestContext().put("security.password", 
"password");
diff --git 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/gcm/GCMTest.java 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/gcm/GCMTest.java
index 4efdc75..1dc1070 100644
--- 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/gcm/GCMTest.java
+++ 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/gcm/GCMTest.java
@@ -138,9 +138,9 @@ public class GCMTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(gcmPort);
         }
-        
-        gcmPort.doubleIt(25);
-        
+
+        assertEquals(50, gcmPort.doubleIt(25));
+
         ((java.io.Closeable)gcmPort).close();
         bus.shutdown(true);
     }
@@ -182,8 +182,8 @@ public class GCMTest extends 
AbstractBusClientServerTestBase {
             SecurityTestUtil.enableStreaming(gcmPort);
         }
 
-        gcmPort.doubleIt(25);
-        
+        assertEquals(50, gcmPort.doubleIt(25));
+
         ((java.io.Closeable)gcmPort).close();
         bus.shutdown(true);
     }
@@ -223,9 +223,8 @@ public class GCMTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(gcmPort);
         }
-        
-        gcmPort.doubleIt(25);
-        
+        assertEquals(50, gcmPort.doubleIt(25));
+
         ((java.io.Closeable)gcmPort).close();
         bus.shutdown(true);
     }
@@ -270,9 +269,9 @@ public class GCMTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(gcmPort);
         }
-        
-        gcmPort.doubleIt(25);
-        
+
+        assertEquals(50, gcmPort.doubleIt(25));
+
         ((java.io.Closeable)gcmPort).close();
         bus.shutdown(true);
     }
@@ -318,9 +317,9 @@ public class GCMTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(gcmPort);
         }
-        
-        gcmPort.doubleIt(25);
-        
+
+        assertEquals(50, gcmPort.doubleIt(25));
+
         ((java.io.Closeable)gcmPort).close();
         bus.shutdown(true);
     }
diff --git 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/https/HttpsTokenTest.java
 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/https/HttpsTokenTest.java
index d700c0b..09ad76b 100644
--- 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/https/HttpsTokenTest.java
+++ 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/https/HttpsTokenTest.java
@@ -106,9 +106,9 @@ public class HttpsTokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(port);
         }
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         // This should fail, as the client does not use a client cert
         portQName = new QName(NAMESPACE, "DoubleItRequireClientCertPort2");
         port = service.getPort(portQName, DoubleItPortType.class);
@@ -170,7 +170,7 @@ public class HttpsTokenTest extends 
AbstractBusClientServerTestBase {
             SecurityTestUtil.enableStreaming(port);
         }
 
-        port.doubleIt(25);
+        assertEquals(50, port.doubleIt(25));
 
         ((java.io.Closeable)port).close();
         bus.shutdown(true);
@@ -196,9 +196,9 @@ public class HttpsTokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(port);
         }
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         // This should fail, as the client does not send a UsernamePassword
         portQName = new QName(NAMESPACE, "DoubleItBasicAuthPort2");
         port = service.getPort(portQName, DoubleItPortType.class);
@@ -243,7 +243,7 @@ public class HttpsTokenTest extends 
AbstractBusClientServerTestBase {
             SecurityTestUtil.enableStreaming(port);
         }
 
-        port.doubleIt(25);
+        assertEquals(50, port.doubleIt(25));
 
         ((java.io.Closeable)port).close();
         bus.shutdown(true);
diff --git 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/parts/PartsTest.java
 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/parts/PartsTest.java
index bef5040..ae5afcd 100644
--- 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/parts/PartsTest.java
+++ 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/parts/PartsTest.java
@@ -146,9 +146,9 @@ public class PartsTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(port);
         }
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         // This should fail, as the service requires a (bad) header
         portQName = new QName(NAMESPACE, "DoubleItRequiredPartsPort2");
         port = service.getPort(portQName, DoubleItPortType.class);
@@ -191,9 +191,9 @@ public class PartsTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(port);
         }
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         // This should fail, as the service requires a (bad) header
         portQName = new QName(NAMESPACE, "DoubleItRequiredElementsPort2");
         port = service.getPort(portQName, DoubleItPortType.class);
@@ -237,9 +237,9 @@ public class PartsTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(port);
         }
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         // This should fail, as the service requires that the Body must be 
signed
         portQName = new QName(NAMESPACE, "DoubleItSignedPartsPort2");
         port = service.getPort(portQName, DoubleItPortType.class);
@@ -301,9 +301,9 @@ public class PartsTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(port);
         }
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         // This should fail, as the service requires that the To header must 
be signed
         portQName = new QName(NAMESPACE, "DoubleItSignedElementsPort2");
         port = service.getPort(portQName, DoubleItPortType.class);
@@ -347,9 +347,9 @@ public class PartsTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(port);
         }
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         // This should fail, as the service requires that the Body must be 
encrypted
         portQName = new QName(NAMESPACE, "DoubleItEncryptedPartsPort2");
         port = service.getPort(portQName, DoubleItPortType.class);
@@ -411,9 +411,9 @@ public class PartsTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(port);
         }
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         // This should fail, as the service requires that the header must be 
encrypted
         portQName = new QName(NAMESPACE, "DoubleItEncryptedElementsPort2");
         port = service.getPort(portQName, DoubleItPortType.class);
@@ -461,9 +461,9 @@ public class PartsTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(port);
         }
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         // This should fail, as the service requires that the header must be 
encrypted
         portQName = new QName(NAMESPACE, "DoubleItEncryptedElementsPort2");
         port = service.getPort(portQName, DoubleItPortType.class);
@@ -507,9 +507,9 @@ public class PartsTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(port);
         }
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         // This should fail, as the service requires that the header must be 
encrypted
         portQName = new QName(NAMESPACE, 
"DoubleItContentEncryptedElementsPort2");
         port = service.getPort(portQName, DoubleItPortType.class);
diff --git 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/BinarySecurityTokenTest.java
 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/BinarySecurityTokenTest.java
index 42752e1..4a3eadd 100644
--- 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/BinarySecurityTokenTest.java
+++ 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/BinarySecurityTokenTest.java
@@ -96,9 +96,9 @@ public class BinarySecurityTokenTest extends 
AbstractBusClientServerTestBase {
         securityToken.setToken(binarySecurity.getElement());
         
         
((BindingProvider)port).getRequestContext().put(SecurityConstants.TOKEN, 
securityToken);
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         ((java.io.Closeable)port).close();
         bus.shutdown(true);
     }
diff --git 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/EndorsingSupportingTokenTest.java
 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/EndorsingSupportingTokenTest.java
index 410a1c1..d5b9ad9 100644
--- 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/EndorsingSupportingTokenTest.java
+++ 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/EndorsingSupportingTokenTest.java
@@ -102,9 +102,9 @@ public class EndorsingSupportingTokenTest extends 
AbstractBusClientServerTestBas
         QName portQName = new QName(NAMESPACE, 
"DoubleItEndorsingSupportingPort");
         DoubleItPortType port = service.getPort(portQName, 
DoubleItPortType.class);
         updateAddressPort(port, test.getPort());
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         // This should fail, as the client is signing (but not endorsing) the 
X.509 Token
         portQName = new QName(NAMESPACE, "DoubleItEndorsingSupportingPort2");
         port = service.getPort(portQName, DoubleItPortType.class);
@@ -156,9 +156,9 @@ public class EndorsingSupportingTokenTest extends 
AbstractBusClientServerTestBas
         QName portQName = new QName(NAMESPACE, 
"DoubleItSignedEndorsingSupportingPort");
         DoubleItPortType port = service.getPort(portQName, 
DoubleItPortType.class);
         updateAddressPort(port, test.getPort());
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         // This should fail, as the client is signing (but not endorsing) the 
X.509 Token
         portQName = new QName(NAMESPACE, 
"DoubleItSignedEndorsingSupportingPort2");
         port = service.getPort(portQName, DoubleItPortType.class);
diff --git 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/SupportingTokenTest.java
 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/SupportingTokenTest.java
index dddaf8a..3faf9c4 100644
--- 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/SupportingTokenTest.java
+++ 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/SupportingTokenTest.java
@@ -122,9 +122,9 @@ public class SupportingTokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(port);
         }
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         // This should fail, as the client is not signing the UsernameToken
         portQName = new QName(NAMESPACE, "DoubleItSignedSupportingPort2");
         port = service.getPort(portQName, DoubleItPortType.class);
@@ -186,9 +186,9 @@ public class SupportingTokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(port);
         }
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         // This should fail, as the client is not encrypting the UsernameToken
         portQName = new QName(NAMESPACE, "DoubleItEncryptedSupportingPort2");
         port = service.getPort(portQName, DoubleItPortType.class);
@@ -255,9 +255,9 @@ public class SupportingTokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(port);
         }
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         // This should fail, as the client is not encrypting the UsernameToken
         portQName = new QName(NAMESPACE, "DoubleItEncryptedSupportingPort5");
         port = service.getPort(portQName, DoubleItPortType.class);
@@ -306,9 +306,9 @@ public class SupportingTokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(port);
         }
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         // This should fail, as the client is not encrypting the UsernameToken
         portQName = new QName(NAMESPACE, 
"DoubleItSignedEncryptedSupportingPort2");
         port = service.getPort(portQName, DoubleItPortType.class);
diff --git 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ut/UsernameTokenDerivedTest.java
 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ut/UsernameTokenDerivedTest.java
index a63e415..4ecb5d1 100644
--- 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ut/UsernameTokenDerivedTest.java
+++ 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ut/UsernameTokenDerivedTest.java
@@ -79,9 +79,9 @@ public class UsernameTokenDerivedTest extends 
AbstractBusClientServerTestBase {
         DoubleItPortType utPort = 
                 service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(utPort, PORT);
-        
-        utPort.doubleIt(25);
-        
+
+        assertEquals(50, utPort.doubleIt(25));
+
         ((java.io.Closeable)utPort).close();
         bus.shutdown(true);
     }
@@ -106,9 +106,9 @@ public class UsernameTokenDerivedTest extends 
AbstractBusClientServerTestBase {
         DoubleItPortType utPort = 
                 service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(utPort, PORT);
-        
-        utPort.doubleIt(25);
-        
+
+        assertEquals(50, utPort.doubleIt(25));
+
         ((java.io.Closeable)utPort).close();
         bus.shutdown(true);
     }
@@ -133,9 +133,9 @@ public class UsernameTokenDerivedTest extends 
AbstractBusClientServerTestBase {
         DoubleItPortType utPort = 
                 service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(utPort, PORT);
-        
-        utPort.doubleIt(25);
-        
+
+        assertEquals(50, utPort.doubleIt(25));
+
         ((java.io.Closeable)utPort).close();
         bus.shutdown(true);
     }
@@ -160,9 +160,9 @@ public class UsernameTokenDerivedTest extends 
AbstractBusClientServerTestBase {
         DoubleItPortType utPort = 
                 service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(utPort, PORT2);
-        
-        utPort.doubleIt(25);
-        
+
+        assertEquals(50, utPort.doubleIt(25));
+
         ((java.io.Closeable)utPort).close();
         bus.shutdown(true);
     }
@@ -187,9 +187,9 @@ public class UsernameTokenDerivedTest extends 
AbstractBusClientServerTestBase {
         DoubleItPortType utPort = 
                 service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(utPort, PORT);
-        
-        utPort.doubleIt(25);
-        
+
+        assertEquals(50, utPort.doubleIt(25));
+
         ((java.io.Closeable)utPort).close();
         bus.shutdown(true);
     }
@@ -214,9 +214,9 @@ public class UsernameTokenDerivedTest extends 
AbstractBusClientServerTestBase {
         DoubleItPortType utPort = 
                 service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(utPort, PORT);
-        
-        utPort.doubleIt(25);
-        
+
+        assertEquals(50, utPort.doubleIt(25));
+
         ((java.io.Closeable)utPort).close();
         bus.shutdown(true);
     }
@@ -241,9 +241,9 @@ public class UsernameTokenDerivedTest extends 
AbstractBusClientServerTestBase {
         DoubleItPortType utPort = 
                 service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(utPort, PORT);
-        
-        utPort.doubleIt(25);
-        
+
+        assertEquals(50, utPort.doubleIt(25));
+
         ((java.io.Closeable)utPort).close();
         bus.shutdown(true);
     }
diff --git 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ut/UsernameTokenPolicyTest.java
 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ut/UsernameTokenPolicyTest.java
index 4cad30d..3d14d66 100644
--- 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ut/UsernameTokenPolicyTest.java
+++ 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ut/UsernameTokenPolicyTest.java
@@ -106,9 +106,9 @@ public class UsernameTokenPolicyTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(port);
         }
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         // This should fail, as the client is not sending a UsernameToken 
Supporting Token
         portQName = new QName(NAMESPACE, "DoubleItSupportingTokenPort2");
         port = service.getPort(portQName, DoubleItPortType.class);
@@ -151,9 +151,9 @@ public class UsernameTokenPolicyTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(port);
         }
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         // This should fail, as the client is sending a hashed password
         portQName = new QName(NAMESPACE, "DoubleItPlaintextPort2");
         port = service.getPort(portQName, DoubleItPortType.class);
@@ -212,9 +212,9 @@ public class UsernameTokenPolicyTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(port);
         }
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         // This should fail, as the client is sending a plaintext password
         portQName = new QName(NAMESPACE, "DoubleItHashPort2");
         port = service.getPort(portQName, DoubleItPortType.class);
@@ -273,9 +273,9 @@ public class UsernameTokenPolicyTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(port);
         }
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         // This should fail, as the client is not sending a Created element
         portQName = new QName(NAMESPACE, "DoubleItCreatedPort2");
         port = service.getPort(portQName, DoubleItPortType.class);
@@ -318,9 +318,9 @@ public class UsernameTokenPolicyTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(port);
         }
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         // This should fail, as the client is not sending a Nonce element
         portQName = new QName(NAMESPACE, "DoubleItNoncePort2");
         port = service.getPort(portQName, DoubleItPortType.class);
diff --git 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ut/UsernameTokenTest.java
 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ut/UsernameTokenTest.java
index 2114b2f..236f9c4 100644
--- 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ut/UsernameTokenTest.java
+++ 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ut/UsernameTokenTest.java
@@ -134,7 +134,7 @@ public class UsernameTokenTest extends 
AbstractBusClientServerTestBase {
         HTTPConduit http = (HTTPConduit) client.getConduit();
         http.setTlsClientParameters(tlsParams);
 
-        utPort.doubleIt(25);
+        assertEquals(50, utPort.doubleIt(25));
 
         ((java.io.Closeable)utPort).close();
     }
@@ -159,9 +159,9 @@ public class UsernameTokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(utPort);
         }
-        
-        utPort.doubleIt(25);
-        
+
+        assertEquals(50, utPort.doubleIt(25));
+
         ((java.io.Closeable)utPort).close();
         bus.shutdown(true);
     }
@@ -186,9 +186,9 @@ public class UsernameTokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(utPort);
         }
-        
-        utPort.doubleIt(25);
-        
+
+        assertEquals(50, utPort.doubleIt(25));
+
         ((java.io.Closeable)utPort).close();
         bus.shutdown(true);
     }
@@ -213,9 +213,9 @@ public class UsernameTokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(utPort);
         }
-        
-        utPort.doubleIt(25);
-        
+
+        assertEquals(50, utPort.doubleIt(25));
+
         ((java.io.Closeable)utPort).close();
         bus.shutdown(true);
     }
@@ -240,9 +240,9 @@ public class UsernameTokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(utPort);
         }
-        
-        utPort.doubleIt(25);
-        
+
+        assertEquals(50, utPort.doubleIt(25));
+
         ((java.io.Closeable)utPort).close();
         bus.shutdown(true);
     }
@@ -267,9 +267,9 @@ public class UsernameTokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(utPort);
         }
-        
-        utPort.doubleIt(25);
-        
+
+        assertEquals(50, utPort.doubleIt(25));
+
         ((java.io.Closeable)utPort).close();
         bus.shutdown(true);
     }
@@ -294,9 +294,9 @@ public class UsernameTokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(utPort);
         }
-        
-        utPort.doubleIt(25);
-        
+
+        assertEquals(50, utPort.doubleIt(25));
+
         ((java.io.Closeable)utPort).close();
         bus.shutdown(true);
     }
@@ -321,9 +321,9 @@ public class UsernameTokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(utPort);
         }
-        
-        utPort.doubleIt(25);
-        
+
+        assertEquals(50, utPort.doubleIt(25));
+
         ((java.io.Closeable)utPort).close();
         bus.shutdown(true);
     }
@@ -348,9 +348,9 @@ public class UsernameTokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(utPort);
         }
-        
-        utPort.doubleIt(25);
-        
+
+        assertEquals(50, utPort.doubleIt(25));
+
         ((java.io.Closeable)utPort).close();
         bus.shutdown(true);
     }
@@ -375,9 +375,9 @@ public class UsernameTokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(utPort);
         }
-        
-        utPort.doubleIt(25);
-        
+
+        assertEquals(50, utPort.doubleIt(25));
+
         ((java.io.Closeable)utPort).close();
         bus.shutdown(true);
     }
@@ -441,7 +441,7 @@ public class UsernameTokenTest extends 
AbstractBusClientServerTestBase {
             cxfClient.getOutInterceptors().add(cacheInterceptor);
             
             // Make two invocations with the same UsernameToken
-            utPort.doubleIt(25);
+            assertEquals(50, utPort.doubleIt(25));
             try {
                 utPort.doubleIt(25);
                 fail("Failure expected on a replayed UsernameToken");
@@ -481,7 +481,7 @@ public class UsernameTokenTest extends 
AbstractBusClientServerTestBase {
             cxfClient.getOutInterceptors().add(cacheInterceptor);
             
             // Make two invocations with the same UsernameToken
-            utPort.doubleIt(25);
+            assertEquals(50, utPort.doubleIt(25));
             try {
                 utPort.doubleIt(25);
                 fail("Failure expected on a replayed UsernameToken");
@@ -516,8 +516,8 @@ public class UsernameTokenTest extends 
AbstractBusClientServerTestBase {
         }
         
         
((BindingProvider)utPort).getRequestContext().put(SecurityConstants.USERNAME, 
"Alice");
-        utPort.doubleIt(25);
-        
+        assertEquals(50, utPort.doubleIt(25));
+
         try {
             
((BindingProvider)utPort).getRequestContext().put(SecurityConstants.USERNAME, 
"Frank");
             utPort.doubleIt(30);
diff --git 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCUnitTest.java
 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCUnitTest.java
index 81cedc7..a7a8469 100644
--- 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCUnitTest.java
+++ 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCUnitTest.java
@@ -124,9 +124,9 @@ public class WSSCUnitTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(port);
         }
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         ((java.io.Closeable)port).close();
     }
     
@@ -150,9 +150,9 @@ public class WSSCUnitTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(port);
         }
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         ((java.io.Closeable)port).close();
     }
     
diff --git 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/X509TokenTest.java
 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/X509TokenTest.java
index b9c6e55..4e5888e 100644
--- 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/X509TokenTest.java
+++ 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/X509TokenTest.java
@@ -165,9 +165,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -192,9 +192,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -219,9 +219,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -246,9 +246,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -277,9 +277,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         
((BindingProvider)x509Port).getRequestContext().put(SecurityConstants.ENCRYPT_PROPERTIES,
                 "bob.properties");
         
((BindingProvider)x509Port).getRequestContext().put(SecurityConstants.ENCRYPT_USERNAME,
 "bob");
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -306,9 +306,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -333,9 +333,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         DoubleItPortType x509Port = 
                 service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(x509Port, INTERMEDIARY_PORT);
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -360,9 +360,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -387,9 +387,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -412,7 +412,7 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         updateAddressPort(x509Port, test.getPort());
         
         if (!test.isStreaming()) {
-            x509Port.doubleIt(25);
+            assertEquals(50, x509Port.doubleIt(25));
         }
         
         ((java.io.Closeable)x509Port).close();
@@ -437,7 +437,7 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         updateAddressPort(x509Port, test.getPort());
         
         if (!test.isStreaming()) {
-            x509Port.doubleIt(25);
+            assertEquals(50, x509Port.doubleIt(25));
         }
         
         ((java.io.Closeable)x509Port).close();
@@ -464,9 +464,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -489,7 +489,7 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         updateAddressPort(x509Port, test.getPort());
         
         if (!test.isStreaming()) {
-            x509Port.doubleIt(25);
+            assertEquals(50, x509Port.doubleIt(25));
         }
         
         ((java.io.Closeable)x509Port).close();
@@ -516,9 +516,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -543,9 +543,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -570,9 +570,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -598,9 +598,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -625,9 +625,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -656,9 +656,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -683,9 +683,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -710,9 +710,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -737,9 +737,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -764,9 +764,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -791,9 +791,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -818,9 +818,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -845,9 +845,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -872,9 +872,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -901,7 +901,7 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         }
         
         if (!test.isStreaming() && !STAX_PORT.equals(test.getPort())) {
-            x509Port.doubleIt(25);
+            assertEquals(50, x509Port.doubleIt(25));
         }
         
         ((java.io.Closeable)x509Port).close();
@@ -928,9 +928,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -958,7 +958,7 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         
         // TODO WSS-456 Streaming
         if (!test.isStreaming()) {
-            x509Port.doubleIt(25);
+            assertEquals(50, x509Port.doubleIt(25));
         }
         
         ((java.io.Closeable)x509Port).close();
@@ -989,9 +989,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -1020,9 +1020,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -1051,9 +1051,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -1082,9 +1082,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -1113,9 +1113,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -1140,9 +1140,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -1167,9 +1167,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -1194,9 +1194,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -1221,9 +1221,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -1254,7 +1254,7 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         cxfClient.getOutInterceptors().add(cacheInterceptor);
         
         // Make two invocations with the same security header
-        x509Port.doubleIt(25);
+        assertEquals(50, x509Port.doubleIt(25));
         try {
             x509Port.doubleIt(25);
             fail("Failure expected on a replayed Timestamp");
@@ -1290,9 +1290,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -1339,9 +1339,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         
((BindingProvider)x509Port).getRequestContext().put(SecurityConstants.SIGNATURE_PROPERTIES,
             "alice.properties");
         
((BindingProvider)x509Port).getRequestContext().put(SecurityConstants.SIGNATURE_USERNAME,
 "alice");
-    
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -1370,9 +1370,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -1493,9 +1493,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         // This should fail, as the client is not endorsing the token
         portQName = new QName(NAMESPACE, 
"DoubleItTransportNegativeEndorsingPort2");
         x509Port = service.getPort(portQName, DoubleItPortType.class);
@@ -1538,9 +1538,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -1565,9 +1565,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
@@ -1592,9 +1592,9 @@ public class X509TokenTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(x509Port);
         }
-        
-        x509Port.doubleIt(25);
-        
+
+        assertEquals(50, x509Port.doubleIt(25));
+
         ((java.io.Closeable)x509Port).close();
         bus.shutdown(true);
     }
diff --git 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/xkms/XKMSTest.java
 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/xkms/XKMSTest.java
index b03af10..3b64926 100644
--- 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/xkms/XKMSTest.java
+++ 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/xkms/XKMSTest.java
@@ -115,9 +115,9 @@ public class XKMSTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(port);
         }
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         ((java.io.Closeable)port).close();
         bus.shutdown(true);
     }
@@ -145,9 +145,9 @@ public class XKMSTest extends 
AbstractBusClientServerTestBase {
         if (test.isStreaming()) {
             SecurityTestUtil.enableStreaming(port);
         }
-        
-        port.doubleIt(25);
-        
+
+        assertEquals(50, port.doubleIt(25));
+
         ((java.io.Closeable)port).close();
         bus.shutdown(true);
     }
diff --git 
a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/action/DoubleItAction.wsdl
 
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/action/DoubleItAction.wsdl
index 9eb6888..5060aa3 100644
--- 
a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/action/DoubleItAction.wsdl
+++ 
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/action/DoubleItAction.wsdl
@@ -84,6 +84,9 @@
         <wsdl:port name="DoubleItSignedSAMLPort" 
binding="tns:DoubleItNoSecurityBinding">
             <soap:address location="http://localhost:9001/DoubleItSignedSAML"/>
         </wsdl:port>
+        <wsdl:port name="DoubleItSignatureConfigPort" 
binding="tns:DoubleItNoSecurityBinding">
+            <soap:address 
location="http://localhost:9001/DoubleItSignatureConfig"/>
+        </wsdl:port>
     </wsdl:service>
     
 </wsdl:definitions>
diff --git 
a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/action/server.xml
 
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/action/server.xml
index adec069..d1230be 100644
--- 
a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/action/server.xml
+++ 
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/action/server.xml
@@ -285,4 +285,17 @@
         </jaxws:inInterceptors>
     </jaxws:endpoint>
     
+    <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt"; 
id="SignatureConfig" 
address="http://localhost:${testutil.ports.action.Server}/DoubleItSignatureConfig";
 serviceName="s:DoubleItService" endpointName="s:DoubleItSignatureConfigPort" 
implementor="org.apache.cxf.systest.ws.common.DoubleItImpl" 
wsdlLocation="org/apache/cxf/systest/ws/action/DoubleItAction.wsdl">
+        <jaxws:inInterceptors>
+            <bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
+                <constructor-arg>
+                    <map>
+                        <entry key="action" value="Signature"/>
+                        <entry key="signatureVerificationPropFile" 
value="bob.properties"/>
+                    </map>
+                </constructor-arg>
+            </bean>
+        </jaxws:inInterceptors>
+    </jaxws:endpoint>
+    
 </beans>

-- 
To stop receiving notification emails like this one, please contact
cohei...@apache.org.

Reply via email to