Remove unused parameter from test data

The "restRequestTimeout" parameter is not used in the current
version of Apex, it was replaced by the "requestorTimeout" paramter.
However, the parameter remained in the JSON data files.

Also updated to improve output of messages during unit test.

This review also sets the Jersey injection dependendy scope to "test"

Issue-ID: POLICY-1074
Change-Id: I75f495f571c8101310bd1eaec01a305318346cd9
Signed-off-by: liamfallon <liam.fallon@est.tech>
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/pom.xml b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/pom.xml
index 9d5b282..0459cd7 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/pom.xml
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/pom.xml
@@ -61,6 +61,7 @@
         <dependency>
             <groupId>org.glassfish.jersey.inject</groupId>
             <artifactId>jersey-hk2</artifactId>
+            <scope>test</scope>
             <version>${version.jersey}</version>
         </dependency>
     </dependencies>
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/main/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/RestRequestorCarrierTechnologyParameters.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/main/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/RestRequestorCarrierTechnologyParameters.java
index d8009ee..5e29922 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/main/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/RestRequestorCarrierTechnologyParameters.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/main/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/RestRequestorCarrierTechnologyParameters.java
@@ -204,12 +204,9 @@
         return result;
     }
 
-    /*
-     * (non-Javadoc)
-     *
-     * @see new LinkedHashMap<>()java.lang.Object#toString()
+    /**
+     * {@inheritDoc}.
      */
-
     @Override
     public String toString() {
         return "RESTRequestorCarrierTechnologyParameters [url=" + url + ", httpMethod=" + httpMethod + ", httpHeaders="
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileDelete.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileDelete.json
index 77079c6..3a27a48 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileDelete.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileDelete.json
@@ -32,8 +32,7 @@
                 "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
                 "parameters": {
                     "url": "http://localhost:32801/TestRESTRequestor/apex/event/DeleteEvent",
-                    "httpMethod": "DELETE",
-                    "restRequestTimeout": 2000
+                    "httpMethod": "DELETE"
                 }
             },
             "eventProtocolParameters": {
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGet.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGet.json
index 09cf0f0..aaf14e5 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGet.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGet.json
@@ -32,8 +32,7 @@
                 "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
                 "parameters": {
                     "url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
-                    "httpMethod": "GET",
-                    "restRequestTimeout": 2000
+                    "httpMethod": "GET"
                 }
             },
             "eventProtocolParameters": {
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGetConsumerAlone.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGetConsumerAlone.json
index f9c916d..145d383 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGetConsumerAlone.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGetConsumerAlone.json
@@ -32,8 +32,7 @@
                 "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
                 "parameters": {
                     "url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
-                    "httpMethod": "GET",
-                    "restRequestTimeout": 2000
+                    "httpMethod": "GET"
                 }
             },
             "eventProtocolParameters": {
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGetEmpty.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGetEmpty.json
index 16baced..ebf9d05 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGetEmpty.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGetEmpty.json
@@ -32,8 +32,7 @@
                 "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
                 "parameters": {
                     "url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEmptyEvent",
-                    "httpMethod": "GET",
-                    "restRequestTimeout": 2000
+                    "httpMethod": "GET"
                 }
             },
             "eventProtocolParameters": {
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGetMulti.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGetMulti.json
index b7b9a44..5b4344b 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGetMulti.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGetMulti.json
@@ -32,8 +32,7 @@
                 "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
                 "parameters": {
                     "url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
-                    "httpMethod": "GET",
-                    "restRequestTimeout": 2000
+                    "httpMethod": "GET"
                 }
             },
             "eventProtocolParameters": {
@@ -61,8 +60,7 @@
                 "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
                 "parameters": {
                     "url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
-                    "httpMethod": "GET",
-                    "restRequestTimeout": 2000
+                    "httpMethod": "GET"
                 }
             },
             "eventProtocolParameters": {
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FilePost.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FilePost.json
index 8d6d4ca..abe50d7 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FilePost.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FilePost.json
@@ -32,8 +32,7 @@
                 "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
                 "parameters": {
                     "url": "http://localhost:32801/TestRESTRequestor/apex/event/PostEvent",
-                    "httpMethod": "POST",
-                    "restRequestTimeout": 2000
+                    "httpMethod": "POST"
                 }
             },
             "eventProtocolParameters": {
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FilePut.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FilePut.json
index c66051c..fa4e4e3 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FilePut.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FilePut.json
@@ -33,7 +33,6 @@
                 "parameters": {
                     "url": "http://localhost:32801/TestRESTRequestor/apex/event/PutEvent",
                     "httpMethod": "PUT",
-                    "restRequestTimeout": 2000,
                     "httpHeaders" : [
                         ["Content-Type", "application/json"],
                         ["Date", "Tue, 4 Dec 2018 14:57:12 GMT"]
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderBadList.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderBadList.json
index c71911a..ffe0442 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderBadList.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderBadList.json
@@ -22,7 +22,6 @@
                 "parameters": {
                     "url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
                     "httpMethod": "GET",
-                    "restRequestTimeout": 2000,
                     "httpHeaders" : [
                         ["aaa", "bbb"],
                         ["ccc", "ddd"],
@@ -44,7 +43,6 @@
                 "parameters": {
                     "url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
                     "httpMethod": "GET",
-                    "restRequestTimeout": 2000,
                     "httpHeaders" : [
                         ,
                     ]
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderNotKvPairs.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderNotKvPairs.json
index dc63c58..c1a195b 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderNotKvPairs.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderNotKvPairs.json
@@ -22,7 +22,6 @@
                 "parameters": {
                     "url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
                     "httpMethod": "GET",
-                    "restRequestTimeout": 2000,
                     "httpHeaders" : [
                         ["aaa", "bbb", "ccc"]
                     ]
@@ -43,7 +42,6 @@
                 "parameters": {
                     "url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
                     "httpMethod": "GET",
-                    "restRequestTimeout": 2000,
                     "httpHeaders" : [
                         ["aaa"]
                     ]
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderNulls.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderNulls.json
index 9992e4f..dd0484e 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderNulls.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderNulls.json
@@ -22,7 +22,6 @@
                 "parameters": {
                     "url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
                     "httpMethod": "GET",
-                    "restRequestTimeout": 2000,
                     "httpHeaders" : [
                         [null, "bbb"],
                         ["ccc", "ddd"]
@@ -44,7 +43,6 @@
                 "parameters": {
                     "url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
                     "httpMethod": "GET",
-                    "restRequestTimeout": 2000,
                     "httpHeaders" : [
                         ["aaa", "bbb"],
                         ["ccc", null],
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderOK.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderOK.json
index e8a25c9..504c773 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderOK.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderOK.json
@@ -22,7 +22,6 @@
                 "parameters": {
                     "url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
                     "httpMethod": "GET",
-                    "restRequestTimeout": 2000,
                     "httpHeaders" : [
                     ]
                 }
@@ -42,7 +41,6 @@
                 "parameters": {
                     "url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
                     "httpMethod": "GET",
-                    "restRequestTimeout": 2000,
                     "httpHeaders" : [
                         ["aaa", "bbb"],
                         ["ccc", "ddd"],
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexEventMarshaller.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexEventMarshaller.java
index 1e92b9f..cb4086d 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexEventMarshaller.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexEventMarshaller.java
@@ -164,7 +164,7 @@
         } catch (final InterruptedException e) {
             // restore the interrupt status
             Thread.currentThread().interrupt();
-            LOGGER.warn("Failed to queue the event: " + apexEvent, e);
+            LOGGER.warn("Queueing of the event was interrupted: " + apexEvent, e);
         }
     }
 
diff --git a/testsuites/integration/integration-uservice-test/pom.xml b/testsuites/integration/integration-uservice-test/pom.xml
index b139f24..3b27641 100644
--- a/testsuites/integration/integration-uservice-test/pom.xml
+++ b/testsuites/integration/integration-uservice-test/pom.xml
@@ -186,6 +186,11 @@
             <artifactId>jersey-container-servlet-core</artifactId>
             <version>${version.jersey}</version>
         </dependency>
+        <dependency>
+            <groupId>org.glassfish.jersey.inject</groupId>
+            <artifactId>jersey-hk2</artifactId>
+            <version>${version.jersey}</version>
+        </dependency>
     </dependencies>
 
     <build>
diff --git a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestRest2File.java b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestRest2File.java
index cb98ec7..94bd6b2 100644
--- a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestRest2File.java
+++ b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestRest2File.java
@@ -21,6 +21,7 @@
 package org.onap.policy.apex.testsuites.integration.uservice.adapt.restclient;
 
 import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 import java.io.ByteArrayOutputStream;
 import java.io.File;
@@ -40,11 +41,14 @@
 import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
 import org.onap.policy.apex.model.utilities.TextFileUtils;
 import org.onap.policy.apex.service.engine.main.ApexMain;
+import org.slf4j.ext.XLogger;
+import org.slf4j.ext.XLoggerFactory;
 
 /**
  * The Class TestRest2File.
  */
 public class TestRest2File {
+    private static final XLogger LOGGER = XLoggerFactory.getXLogger(TestRest2File.class);
 
     private static final String BASE_URI = "http://localhost:32801/TestRest2File";
     private HttpServer server;
@@ -105,8 +109,7 @@
      */
     @Test
     public void testRestEventsIn() throws MessagingException, ApexException, IOException {
-        final String[] args =
-            { "-rfr", "target", "-c", "target/examples/config/SampleDomain/REST2FileJsonEvent.json" };
+        final String[] args = { "-rfr", "target", "-c", "target/examples/config/SampleDomain/REST2FileJsonEvent.json" };
 
         final ApexMain apexMain = new ApexMain(args);
 
@@ -114,9 +117,13 @@
         apexMain.shutdown();
 
         final String outputEventText = TextFileUtils
-                        .getTextFileAsString("target/examples/events/SampleDomain/EventsOut.json");
-        assertTrue(outputEventText.contains("04\",\n" + "  \"version\": \"0.0.1\",\n"
-                        + "  \"nameSpace\": \"org.onap.policy.apex.sample.events\""));
+            .getTextFileAsString("target/examples/events/SampleDomain/EventsOut.json");
+
+        if (!outputEventText.contains(
+            "04\",\n" + "  \"version\": \"0.0.1\",\n" + "  \"nameSpace\": \"org.onap.policy.apex.sample.events\"")) {
+            LOGGER.error(outputEventText);
+            fail("test output did not contain required string");
+        }
     }
 
     /**
@@ -131,8 +138,7 @@
         System.setOut(new PrintStream(outContent));
         System.setErr(new PrintStream(errContent));
 
-        final String[] args =
-            { "src/test/resources/prodcons/REST2FileJsonEmptyEvents.json" };
+        final String[] args = { "src/test/resources/prodcons/REST2FileJsonEmptyEvents.json" };
         final ApexMain apexMain = new ApexMain(args);
 
         ThreadUtilities.sleep(1000);
@@ -143,8 +149,11 @@
         System.setOut(stdout);
         System.setErr(stderr);
 
-        assertTrue(outString.contains(
-                        "received an empty event from URL \"http://localhost:32801/TestRest2File/apex/event/GetEmptyEvent\""));
+        if (!outString.contains(
+            "received an empty event from URL \"http://localhost:32801/TestRest2File/apex/event/GetEmptyEvent\"")) {
+            LOGGER.error(outString);
+            fail("test output did not contain required string");
+        }
     }
 
     /**
@@ -159,8 +168,7 @@
         System.setOut(new PrintStream(outContent));
         System.setErr(new PrintStream(errContent));
 
-        final String[] args =
-            { "src/test/resources/prodcons/REST2FileJsonEventNoURL.json" };
+        final String[] args = { "src/test/resources/prodcons/REST2FileJsonEventNoURL.json" };
         final ApexMain apexMain = new ApexMain(args);
 
         ThreadUtilities.sleep(1000);
@@ -171,7 +179,10 @@
         System.setOut(stdout);
         System.setErr(stderr);
 
-        assertTrue(outString.contains(" no URL has been set for event sending on REST client"));
+        if (!outString.contains(" no URL has been set for event sending on REST client")) {
+            LOGGER.error(outString);
+            fail("test output did not contain required string");
+        }
     }
 
     /**
@@ -186,8 +197,7 @@
         System.setOut(new PrintStream(outContent));
         System.setErr(new PrintStream(errContent));
 
-        final String[] args =
-            { "src/test/resources/prodcons/REST2FileJsonEventBadURL.json" };
+        final String[] args = { "src/test/resources/prodcons/REST2FileJsonEventBadURL.json" };
         final ApexMain apexMain = new ApexMain(args);
 
         ThreadUtilities.sleep(1000);
@@ -198,8 +208,11 @@
         System.setOut(stdout);
         System.setErr(stderr);
 
-        assertTrue(outString.contains(
-                        "reception of event from URL \"http://localhost:32801/TestRest2File/apex/event/Bad\" failed with status code 404"));
+        if (!outString.contains(
+            "reception of event from URL \"http://localhost:32801/TestRest2File/apex/event/Bad\" failed with status code 404")) {
+            LOGGER.error(outString);
+            fail("test output did not contain required string");
+        }
     }
 
     /**
@@ -214,8 +227,7 @@
         System.setOut(new PrintStream(outContent));
         System.setErr(new PrintStream(errContent));
 
-        final String[] args =
-            { "src/test/resources/prodcons/REST2FileJsonEventBadHTTPMethod.json" };
+        final String[] args = { "src/test/resources/prodcons/REST2FileJsonEventBadHTTPMethod.json" };
         final ApexMain apexMain = new ApexMain(args);
 
         ThreadUtilities.sleep(1000);
@@ -226,8 +238,11 @@
         System.setOut(stdout);
         System.setErr(stderr);
 
-        assertTrue(outString.contains("specified HTTP method of \"POST\" is invalid, "
-                        + "only HTTP method \"GET\" is supported for event reception on REST client consumer"));
+        if (!outString.contains("specified HTTP method of \"POST\" is invalid, "
+            + "only HTTP method \"GET\" is supported for event reception on REST client consumer")) {
+            LOGGER.error(outString);
+            fail("test output did not contain required string");
+        }
     }
 
     /**
@@ -242,8 +257,7 @@
         System.setOut(new PrintStream(outContent));
         System.setErr(new PrintStream(errContent));
 
-        final String[] args =
-            { "src/test/resources/prodcons/REST2FileJsonEventBadResponse.json" };
+        final String[] args = { "src/test/resources/prodcons/REST2FileJsonEventBadResponse.json" };
         final ApexMain apexMain = new ApexMain(args);
 
         ThreadUtilities.sleep(1000);
@@ -254,7 +268,10 @@
         System.setOut(stdout);
         System.setErr(stderr);
 
-        assertTrue(outString.contains(
-                        "reception of event from URL \"http://localhost:32801/TestRest2File/apex/event/GetEventBadResponse\" failed with status code 400 and message \"\""));
+        if (!outString.contains(
+            "reception of event from URL \"http://localhost:32801/TestRest2File/apex/event/GetEventBadResponse\" failed with status code 400 and message \"\"")) {
+            LOGGER.error(outString);
+            fail("test output did not contain required string");
+        }
     }
 }