You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2018/12/26 10:55:59 UTC
[cxf] 07/08: Stop extending Assert in systests/ws-rm
This is an automated email from the ASF dual-hosted git repository.
coheigea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git
commit ec4d50bd3c69617b0d7db23f1e059ad3a4c88fb1
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Tue Dec 25 19:47:06 2018 +0000
Stop extending Assert in systests/ws-rm
---
.../ws/rm/AbstractClientPersistenceTest.java | 4 ++++
.../ws/rm/AbstractServerPersistenceTest.java | 3 +++
.../cxf/systest/ws/rm/CachedOutMessageTest.java | 2 ++
.../cxf/systest/ws/rm/DecoupledBareTest.java | 3 +++
.../ws/rm/DecoupledClientServerOnewayTest.java | 1 +
.../systest/ws/rm/DecoupledClientServerTest.java | 2 ++
.../systest/ws/rm/DeliveryAssuranceOnewayTest.java | 6 +++++-
.../cxf/systest/ws/rm/ManagedEndpointsTest.java | 5 +++++
.../systest/ws/rm/MessageCallbackOnewayTest.java | 5 +++++
.../cxf/systest/ws/rm/ProtocolVariationsTest.java | 4 ++++
.../apache/cxf/systest/ws/rm/RedeliveryTest.java | 5 +++++
.../cxf/systest/ws/rm/RetransmissionGZIPTest.java | 4 ++++
.../cxf/systest/ws/rm/RetransmissionQueueTest.java | 7 ++++++-
.../systest/ws/rm/RobustServiceAtMostOnceTest.java | 3 +++
.../systest/ws/rm/RobustServiceWithFaultTest.java | 4 ++++
.../org/apache/cxf/systest/ws/rm/SequenceTest.java | 4 ++++
.../cxf/systest/ws/rm/SequenceTimeoutTest.java | 22 ++++++++++++----------
.../systest/ws/rm/ServiceInvocationAckBase.java | 3 +++
.../cxf/systest/ws/rm/WSRM12ServerCycleTest.java | 19 ++++++++++---------
.../ws/rm/policy/WSRMOptionalPolicyTest.java | 2 ++
.../ws/rm/sec/WSRMWithWSSecurityPolicyTest.java | 1 +
21 files changed, 88 insertions(+), 21 deletions(-)
diff --git a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/AbstractClientPersistenceTest.java b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/AbstractClientPersistenceTest.java
index 117565c..fd337f4 100644
--- a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/AbstractClientPersistenceTest.java
+++ b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/AbstractClientPersistenceTest.java
@@ -56,6 +56,10 @@ import org.apache.cxf.ws.rm.persistence.jdbc.RMTxStore;
import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
/**
* Tests the addition of WS-RM properties to application messages and the
* exchange of WS-RM protocol messages.
diff --git a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/AbstractServerPersistenceTest.java b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/AbstractServerPersistenceTest.java
index 0ab2e1b..8026d94 100644
--- a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/AbstractServerPersistenceTest.java
+++ b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/AbstractServerPersistenceTest.java
@@ -51,6 +51,9 @@ import org.apache.cxf.ws.rm.persistence.jdbc.RMTxStore;
import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
/**
* Tests the addition of WS-RM properties to application messages and the
* exchange of WS-RM protocol messages.
diff --git a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/CachedOutMessageTest.java b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/CachedOutMessageTest.java
index e69b721..f76d5bc 100644
--- a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/CachedOutMessageTest.java
+++ b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/CachedOutMessageTest.java
@@ -41,6 +41,8 @@ import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
+import static org.junit.Assert.assertTrue;
+
/**
* Tests the WS-RM processing with the cached out message (using temporary files).
*/
diff --git a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledBareTest.java b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledBareTest.java
index fef7ad8..4ab58ba 100644
--- a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledBareTest.java
+++ b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledBareTest.java
@@ -43,6 +43,9 @@ import org.apache.hello_world_soap_http.types.BareDocumentResponse;
import org.junit.BeforeClass;
import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
/**
* Tests the addition of WS-RM properties to application messages and the
diff --git a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledClientServerOnewayTest.java b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledClientServerOnewayTest.java
index 29d9a17..9c92ebb 100644
--- a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledClientServerOnewayTest.java
+++ b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledClientServerOnewayTest.java
@@ -42,6 +42,7 @@ import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
import org.junit.BeforeClass;
import org.junit.Test;
+import static org.junit.Assert.assertTrue;
/**
* Tests the addition of WS-RM properties to application messages and the
diff --git a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledClientServerTest.java b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledClientServerTest.java
index c6b8abf..9120713 100644
--- a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledClientServerTest.java
+++ b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledClientServerTest.java
@@ -42,6 +42,8 @@ import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
import org.junit.BeforeClass;
import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
/**
* Tests the addition of WS-RM properties to application messages and the
diff --git a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/DeliveryAssuranceOnewayTest.java b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/DeliveryAssuranceOnewayTest.java
index b274720..fde16b8 100644
--- a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/DeliveryAssuranceOnewayTest.java
+++ b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/DeliveryAssuranceOnewayTest.java
@@ -58,6 +58,10 @@ import org.apache.cxf.ws.rm.RMManager;
import org.junit.After;
import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
/**
* Tests the operation of InOrder delivery assurance for one-way messages to the server.
*/
@@ -238,7 +242,7 @@ public class DeliveryAssuranceOnewayTest extends AbstractBusClientServerTestBase
assertTrue("Message out of order", argNum < callArgs.length);
}
}
-
+
@Test
public void testOnewayAtLeastOnceInOrderDelay() throws Exception {
int numMessages = 4;
diff --git a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/ManagedEndpointsTest.java b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/ManagedEndpointsTest.java
index 442a04b..f46e8e9 100755
--- a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/ManagedEndpointsTest.java
+++ b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/ManagedEndpointsTest.java
@@ -54,6 +54,11 @@ import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
/**
*
*/
diff --git a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/MessageCallbackOnewayTest.java b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/MessageCallbackOnewayTest.java
index 4ac5c42..5d5afdb 100644
--- a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/MessageCallbackOnewayTest.java
+++ b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/MessageCallbackOnewayTest.java
@@ -61,6 +61,11 @@ import org.apache.cxf.ws.rm.RMMessageConstants;
import org.junit.After;
import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
/**
* Tests the operation of MessageCallback for one-way messages to the server.
*/
diff --git a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/ProtocolVariationsTest.java b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/ProtocolVariationsTest.java
index dbf0b84..5cb3114 100644
--- a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/ProtocolVariationsTest.java
+++ b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/ProtocolVariationsTest.java
@@ -62,6 +62,10 @@ import org.junit.After;
import org.junit.BeforeClass;
import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
/**
* Tests control of WS-RM protocol variations on the client, and of the server responses matching whichever
* variation is used by the client.
diff --git a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/RedeliveryTest.java b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/RedeliveryTest.java
index a2a4aba0..db60a48 100644
--- a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/RedeliveryTest.java
+++ b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/RedeliveryTest.java
@@ -40,6 +40,11 @@ import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
/**
* Tests the redelivery of the message upon a delivery error.
*/
diff --git a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/RetransmissionGZIPTest.java b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/RetransmissionGZIPTest.java
index 7ef8c37..79b61f2 100755
--- a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/RetransmissionGZIPTest.java
+++ b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/RetransmissionGZIPTest.java
@@ -38,6 +38,10 @@ import org.apache.cxf.ws.rm.RMManager;
import org.junit.BeforeClass;
import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
/**
* Tests the gzip feature does not interfere with the ws-rm retransmission.
* Note that the current retransmission logic isn't optimal (in some sense, wrong)
diff --git a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/RetransmissionQueueTest.java b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/RetransmissionQueueTest.java
index 2189a1a..a62b3dd 100644
--- a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/RetransmissionQueueTest.java
+++ b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/RetransmissionQueueTest.java
@@ -40,6 +40,11 @@ import org.apache.cxf.ws.rm.manager.SourcePolicyType;
import org.junit.BeforeClass;
import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
/**
* Tests the decoupling the soap fault handling if the fault occurs after
* the message is queued and retransmission is scheduled.
@@ -137,7 +142,7 @@ public class RetransmissionQueueTest extends AbstractBusClientServerTestBase {
empty = manager.getRetransmissionQueue().isEmpty();
assertTrue("RetransmissionQueue not cleared", empty);
}
-
+
@Test
public void testOnewayFaultHandlingWithoutRetry() throws Exception {
SpringBusFactory bf = new SpringBusFactory();
diff --git a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/RobustServiceAtMostOnceTest.java b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/RobustServiceAtMostOnceTest.java
index 5804d8d..8430068 100644
--- a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/RobustServiceAtMostOnceTest.java
+++ b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/RobustServiceAtMostOnceTest.java
@@ -37,6 +37,9 @@ import org.apache.cxf.ws.rm.RMManager;
import org.junit.BeforeClass;
import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
/**
* Tests the addition of WS-RM properties to application messages and the
* exchange of WS-RM protocol messages.
diff --git a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/RobustServiceWithFaultTest.java b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/RobustServiceWithFaultTest.java
index 406e590..a258eb3 100644
--- a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/RobustServiceWithFaultTest.java
+++ b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/RobustServiceWithFaultTest.java
@@ -40,6 +40,10 @@ import org.apache.cxf.ws.rm.RMManager;
import org.junit.BeforeClass;
import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
/**
* Tests the addition of WS-RM properties to application messages and the
* exchange of WS-RM protocol messages.
diff --git a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java
index 7b99342..1234f52 100644
--- a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java
+++ b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java
@@ -96,6 +96,10 @@ import org.junit.After;
import org.junit.BeforeClass;
import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
/**
* Tests the addition of WS-RM properties to application messages and the
diff --git a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTimeoutTest.java b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTimeoutTest.java
index 0a04564..3300753 100644
--- a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTimeoutTest.java
+++ b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTimeoutTest.java
@@ -54,9 +54,11 @@ import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
/**
- *
+ *
*/
public class SequenceTimeoutTest extends AbstractBusClientServerTestBase {
public static final String PORT = TestUtil.getPortNumber(SequenceTimeoutTest.class);
@@ -67,7 +69,7 @@ public class SequenceTimeoutTest extends AbstractBusClientServerTestBase {
= new QName("http://cxf.apache.org/greeter_control", "GreeterService");
private static RMManager rmManager;
-
+
private Bus greeterBus;
private Greeter greeter;
@@ -81,9 +83,9 @@ public class SequenceTimeoutTest extends AbstractBusClientServerTestBase {
Bus bus = bf.createBus("org/apache/cxf/systest/ws/rm/rminterceptors.xml");
System.clearProperty("db.name");
BusFactory.setDefaultBus(bus);
-
+
setBus(bus);
-
+
rmManager = bus.getExtension(RMManager.class);
rmManager.getConfiguration().setInactivityTimeout(1000L);
@@ -99,8 +101,8 @@ public class SequenceTimeoutTest extends AbstractBusClientServerTestBase {
endpoint.stop();
}
}
-
-
+
+
@BeforeClass
public static void setUpBeforeClass() throws Exception {
assertTrue("server did not launch correctly", launchServer(Server.class, true));
@@ -133,8 +135,8 @@ public class SequenceTimeoutTest extends AbstractBusClientServerTestBase {
greeterBus = bf.createBus(cfgResource);
BusFactory.setDefaultBus(greeterBus);
}
-
-
+
+
private Dispatch<DOMSource> initDispatch() {
GreeterService gs = new GreeterService();
Dispatch<DOMSource> dispatch = gs.createDispatch(GreeterService.GreeterPort,
@@ -175,10 +177,10 @@ public class SequenceTimeoutTest extends AbstractBusClientServerTestBase {
int count = 5;
for (int x = 0; x < count; x++) {
Dispatch<DOMSource> dispatch = initDispatch();
- AcksPolicyType ap = new AcksPolicyType();
+ AcksPolicyType ap = new AcksPolicyType();
//don't send the acks to cause a memory leak - CXF-7096
ap.setImmediaAcksTimeout(500000L);
- greeterBus.getExtension(RMManager.class).getDestinationPolicy().setAcksPolicy(ap);
+ greeterBus.getExtension(RMManager.class).getDestinationPolicy().setAcksPolicy(ap);
dispatch.invoke(getDOMRequest("One"));
dispatches.add(dispatch);
}
diff --git a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/ServiceInvocationAckBase.java b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/ServiceInvocationAckBase.java
index 3136ac6..54a4f9b 100755
--- a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/ServiceInvocationAckBase.java
+++ b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/ServiceInvocationAckBase.java
@@ -42,6 +42,9 @@ import org.apache.cxf.ws.rm.RetransmissionQueue;
import org.junit.After;
import org.junit.Test;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
/**
* Tests the acknowledgement delivery back to the non-decoupled port when there is some
* error at the provider side and how its behavior is affected by the robust in-only mode setting.
diff --git a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/WSRM12ServerCycleTest.java b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/WSRM12ServerCycleTest.java
index 6b2851b..d5b0239 100644
--- a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/WSRM12ServerCycleTest.java
+++ b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/WSRM12ServerCycleTest.java
@@ -48,9 +48,10 @@ import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
+import static org.junit.Assert.assertTrue;
/**
- *
+ *
*/
public class WSRM12ServerCycleTest extends AbstractBusClientServerTestBase {
public static final String PORT = allocatePort(WSRM12ServerCycleTest.class);
@@ -102,17 +103,17 @@ public class WSRM12ServerCycleTest extends AbstractBusClientServerTestBase {
launchServer(Server.class, null, new String[] {PORT, "cxf7392"}, true));
}
-
- private String getPrefix() {
+
+ private String getPrefix() {
return "cxf7392";
}
-
+
public static RMFeature wsrm() {
return wsrm(DEFAULT_BASE_RETRANSMISSION_INTERVAL, DEFAULT_ACKNOWLEDGEMENT_INTERVAL);
}
public static RMFeature wsrm(long brtxInterval, long ackInterval) {
- RMAssertion.BaseRetransmissionInterval baseRetransmissionInterval
+ RMAssertion.BaseRetransmissionInterval baseRetransmissionInterval
= new RMAssertion.BaseRetransmissionInterval();
baseRetransmissionInterval.setMilliseconds(Long.valueOf(brtxInterval));
RMAssertion.AcknowledgementInterval acknowledgementInterval = new RMAssertion.AcknowledgementInterval();
@@ -155,7 +156,7 @@ public class WSRM12ServerCycleTest extends AbstractBusClientServerTestBase {
System.clearProperty("javax.xml.transform.TransformerFactory");
}
}
-
+
public void runTest(String cfg, boolean faultOnRestart) throws Exception {
SpringBusFactory bf = new SpringBusFactory();
@@ -186,11 +187,11 @@ public class WSRM12ServerCycleTest extends AbstractBusClientServerTestBase {
control.stopGreeter(cfg);
-
+
//make sure greeter is down
Thread.sleep(1000);
control.startGreeter(cfg);
-
+
//CXF-7392
if (faultOnRestart) {
try {
@@ -203,7 +204,7 @@ public class WSRM12ServerCycleTest extends AbstractBusClientServerTestBase {
// this should work as the sequence should be recovered on the server side
greeter.greetMe("four");
}
-
+
((Closeable)greeter).close();
greeterBus.shutdown(true);
diff --git a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/policy/WSRMOptionalPolicyTest.java b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/policy/WSRMOptionalPolicyTest.java
index 848a551..9664ded 100644
--- a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/policy/WSRMOptionalPolicyTest.java
+++ b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/policy/WSRMOptionalPolicyTest.java
@@ -30,6 +30,8 @@ import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.junit.BeforeClass;
import org.junit.Test;
+import static org.junit.Assert.assertTrue;
+
public class WSRMOptionalPolicyTest extends AbstractBusClientServerTestBase {
public static final String PORT = Server.PORT;
private static final URL WSDL = GreetingService.class.getResource("greeting.wsdl");
diff --git a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/sec/WSRMWithWSSecurityPolicyTest.java b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/sec/WSRMWithWSSecurityPolicyTest.java
index 059032a..c69cd6a 100644
--- a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/sec/WSRMWithWSSecurityPolicyTest.java
+++ b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/sec/WSRMWithWSSecurityPolicyTest.java
@@ -44,6 +44,7 @@ import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
+import static org.junit.Assert.assertTrue;
/**
* Tests the correct interaction of ws-rm calls with security.when policy validator verifies the calls.