diff --git a/examples/examples-onap-vcpe/src/main/resources/examples/config/ONAPvCPE/ApexConfig.json b/examples/examples-onap-vcpe/src/main/resources/examples/config/ONAPvCPE/ApexConfig.json
index 5208767..01269c6 100644
--- a/examples/examples-onap-vcpe/src/main/resources/examples/config/ONAPvCPE/ApexConfig.json
+++ b/examples/examples-onap-vcpe/src/main/resources/examples/config/ONAPvCPE/ApexConfig.json
@@ -40,7 +40,9 @@
                     "url": "http://172.18.0.6:8081/pdp/api/getDecision",
                     "httpMethod": "POST",
                     "restRequestTimeout": 2000,
-                    "httpHeader": "Authorization:dGVzdHBkcDphbHBoYTEyMw== ClientAuth:cHl0aG9uOnRlc3Q="
+                    "httpHeaders": [
+                        ["Authorization:dGVzdHBkcDphbHBoYTEyMw== ClientAuth:cHl0aG9uOnRlc3Q="]
+                    ]
                 }
             },
             "eventProtocolParameters": {
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-grpc/src/main/java/org/onap/policy/apex/plugins/event/carrier/grpc/ApexGrpcProducer.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-grpc/src/main/java/org/onap/policy/apex/plugins/event/carrier/grpc/ApexGrpcProducer.java
index 2e47362..6046a31 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-grpc/src/main/java/org/onap/policy/apex/plugins/event/carrier/grpc/ApexGrpcProducer.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-grpc/src/main/java/org/onap/policy/apex/plugins/event/carrier/grpc/ApexGrpcProducer.java
@@ -1,6 +1,7 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2020 Nordix Foundation.
+ *  Modifications Copyright (C) 2020 Bell Canada. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -124,9 +125,8 @@
         }
 
         if (!EventType.EVENT_COMPONENT_EXECUTED.equals(cdsResponse.get().getStatus().getEventType())) {
-            String errorMessage = "Sending event \"" + eventName + "\" by " + this.name + " to CDS failed, "
-                + "response from CDS:\n" + cdsResponse.get();
-            throw new ApexEventRuntimeException(errorMessage);
+            LOGGER.error("Sending event \"{}\" by {} to CDS failed. Response from CDS:\n{}", eventName, this.name,
+                cdsResponse.get());
         }
 
         consumeEvent(executionId, cdsResponse.get());
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-grpc/src/test/java/org/onap/policy/apex/plugins/event/carrier/grpc/ApexGrpcProducerTest.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-grpc/src/test/java/org/onap/policy/apex/plugins/event/carrier/grpc/ApexGrpcProducerTest.java
index 53d191e..13ecaba 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-grpc/src/test/java/org/onap/policy/apex/plugins/event/carrier/grpc/ApexGrpcProducerTest.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-grpc/src/test/java/org/onap/policy/apex/plugins/event/carrier/grpc/ApexGrpcProducerTest.java
@@ -1,6 +1,7 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2020 Nordix Foundation.
+ *  Modifications Copyright (C) 2020 Bell Canada. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -20,7 +21,6 @@
 
 package org.onap.policy.apex.plugins.event.carrier.grpc;
 
-import static org.assertj.core.api.Assertions.assertThatThrownBy;
 import static org.mockito.Mockito.spy;
 
 import java.nio.file.Files;
@@ -37,6 +37,7 @@
 
 @RunWith(MockitoJUnitRunner.class)
 public class ApexGrpcProducerTest {
+    private static final String PRODUCER_NAME = "TestApexGrpcProducer";
     private static final String HOST = "localhost";
     @Mock
     private CdsProcessorGrpcClient grpcClient;
@@ -56,30 +57,30 @@
 
     @Test(expected = ApexEventException.class)
     public void testInit_fail() throws ApexEventException {
-        apexGrpcProducer.init("TestApexGrpcProducer", new EventHandlerParameters());
+        apexGrpcProducer.init(PRODUCER_NAME, new EventHandlerParameters());
     }
 
     @Test
     public void testInit_pass() {
         // should not throw an exception
-        Assertions.assertThatCode(() -> apexGrpcProducer.init("TestApexGrpcProducer", eventHandlerParameters))
+        Assertions.assertThatCode(() -> apexGrpcProducer.init(PRODUCER_NAME, eventHandlerParameters))
             .doesNotThrowAnyException();
     }
 
     @Test
     public void testStop() throws ApexEventException {
-        apexGrpcProducer.init("TestApexGrpcProducer", eventHandlerParameters);
+        apexGrpcProducer.init(PRODUCER_NAME, eventHandlerParameters);
         // should not throw an exception
         Assertions.assertThatCode(() -> apexGrpcProducer.stop()).doesNotThrowAnyException();
     }
 
     @Test
     public void testSendEvent() throws ApexEventException {
-        apexGrpcProducer.init("TestApexGrpcProducer", eventHandlerParameters);
-        assertThatThrownBy(() -> {
-            apexGrpcProducer.sendEvent(123, null, "grpcEvent",
-                Files.readString(Paths.get("src/test/resources/executionServiceInputEvent.json")));
-        }).hasMessageContaining("UNAVAILABLE: io exception");
+        apexGrpcProducer.init(PRODUCER_NAME, eventHandlerParameters);
+        Assertions
+            .assertThatCode(() -> apexGrpcProducer.sendEvent(123, null, "grpcEvent",
+                Files.readString(Paths.get("src/test/resources/executionServiceInputEvent.json"))))
+            .doesNotThrowAnyException();
     }
 
     private void populateEventHandlerParameters(String host, int timeout) {
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/main/java/org/onap/policy/apex/plugins/event/carrier/restclient/RestClientCarrierTechnologyParameters.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/main/java/org/onap/policy/apex/plugins/event/carrier/restclient/RestClientCarrierTechnologyParameters.java
index 47e94ff..d5bca3f 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/main/java/org/onap/policy/apex/plugins/event/carrier/restclient/RestClientCarrierTechnologyParameters.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/main/java/org/onap/policy/apex/plugins/event/carrier/restclient/RestClientCarrierTechnologyParameters.java
@@ -24,6 +24,8 @@
 import lombok.Getter;
 import lombok.Setter;
 import org.onap.policy.apex.service.parameters.carriertechnology.RestPluginCarrierTechnologyParameters;
+import org.onap.policy.common.parameters.GroupValidationResult;
+import org.onap.policy.common.parameters.ValidationStatus;
 
 // @formatter:off
 /**
@@ -59,4 +61,19 @@
         this.setEventProducerPluginClass(ApexRestClientProducer.class.getName());
         this.setEventConsumerPluginClass(ApexRestClientConsumer.class.getName());
     }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public GroupValidationResult validateUrl(final GroupValidationResult result) {
+        // Check if the URL has been set for event output
+        final String urlNullMessage = "no URL has been set for event sending on " + getLabel();
+        if (getUrl() == null) {
+            result.setResult("url", ValidationStatus.INVALID, urlNullMessage);
+            return result;
+        }
+
+        return super.validateUrl(result);
+    }
 }
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 9f3a631..9e55e22 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
@@ -21,12 +21,9 @@
 
 package org.onap.policy.apex.plugins.event.carrier.restrequestor;
 
-import java.util.regex.Matcher;
 import lombok.Getter;
 import lombok.Setter;
 import org.onap.policy.apex.service.parameters.carriertechnology.RestPluginCarrierTechnologyParameters;
-import org.onap.policy.common.parameters.GroupValidationResult;
-import org.onap.policy.common.parameters.ValidationStatus;
 
 // @formatter:off
 /**
@@ -70,33 +67,4 @@
         this.setEventProducerPluginClass(ApexRestRequestorProducer.class.getName());
         this.setEventConsumerPluginClass(ApexRestRequestorConsumer.class.getName());
     }
-
-    // @formatter:off
-    /**
-     * Validate the URL.
-     *
-     * <p>Checks:
-     * http://www.blah.com/{par1/somethingelse (Missing end tag) use  {[^\\{}]*$
-     * http://www.blah.com/{par1/{some}thingelse (Nested tag) use {[^}]*{
-     * http://www.blah.com/{par1}/some}thingelse (Missing start tag1) use }[^{}]*.}
-     * http://www.blah.com/par1}/somethingelse (Missing start tag2) use }[^{}]*}
-     * http://www.blah.com/{}/somethingelse (Empty tag) use {[\s]*}
-     * @param result the result of the validation
-     */
-    // @formatter:on
-    @Override
-    public GroupValidationResult validateUrl(final GroupValidationResult result) {
-        // URL is only set on Requestor consumers
-        if (getUrl() == null) {
-            return result;
-        }
-
-        Matcher matcher = patternErrorKey.matcher(getUrl());
-        if (matcher.find()) {
-            result.setResult("url", ValidationStatus.INVALID,
-                    "no proper URL has been set for event sending on REST requestor");
-        }
-
-        return result;
-    }
 }
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/RestPluginCarrierTechnologyParameters.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/RestPluginCarrierTechnologyParameters.java
index 9a33119..eab936e 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/RestPluginCarrierTechnologyParameters.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/RestPluginCarrierTechnologyParameters.java
@@ -64,12 +64,14 @@
     private static final Logger LOGGER = LoggerFactory.getLogger(RestPluginCarrierTechnologyParameters.class);
 
     /** The supported HTTP methods. */
+    // @formatter:off
     public enum HttpMethod {
         GET,
         PUT,
         POST,
         DELETE
     }
+    // @formatter:on
 
     /** The default HTTP code filter, allows 2xx HTTP codes through. */
     public static final String DEFAULT_HTTP_CODE_FILTER = "[2][0-9][0-9]";
@@ -80,8 +82,8 @@
 
     // Regular expression patterns for finding and checking keys in URLs
     private static final Pattern patternProperKey = Pattern.compile("(?<=\\{)[^}]*(?=\\})");
-    protected static final Pattern patternErrorKey =
-            Pattern.compile("(\\{[^\\{}]*.?\\{)|(\\{[^\\{}]*$)|(\\}[^\\{}]*.?\\})|(^[^\\{}]*.?\\})|\\{\\s*\\}");
+    protected static final Pattern patternErrorKey = Pattern
+        .compile("(\\{[^\\{}]*.?\\{)|(\\{[^\\{}]*$)|(\\}[^\\{}]*.?\\})|(^[^\\{}]*.?\\})|\\{\\s*\\}");
 
     // variable
     protected String url = null;
@@ -90,8 +92,8 @@
     protected String httpCodeFilter = DEFAULT_HTTP_CODE_FILTER;
 
     /**
-     * Constructor to create a REST carrier technology parameters instance and register the instance with the parameter
-     * service.
+     * Constructor to create a REST carrier technology parameters instance and
+     * register the instance with the parameter service.
      */
     public RestPluginCarrierTechnologyParameters() {
         super();
@@ -176,16 +178,16 @@
      */
     // @formatter:on
     public GroupValidationResult validateUrl(final GroupValidationResult result) {
-        // Check if the URL has been set for event output
-        String urlErrorMessage = "no URL has been set for event sending on " + getLabel();
+        // The URL may be optional so existence must be checked in the plugin code
         if (getUrl() == null) {
-            result.setResult("url", ValidationStatus.INVALID, urlErrorMessage);
             return result;
         }
 
         Matcher matcher = patternErrorKey.matcher(getUrl());
         if (matcher.find()) {
-            result.setResult("url", ValidationStatus.INVALID, urlErrorMessage);
+            final String urlInvalidMessage = "invalid URL " + getUrl() + " has been set for event sending on "
+                + getLabel();
+            result.setResult("url", ValidationStatus.INVALID, urlInvalidMessage);
         }
 
         return result;
@@ -206,14 +208,13 @@
                 result.setResult(HTTP_HEADERS, ValidationStatus.INVALID, "HTTP header array entry is null");
             } else if (httpHeader.length != 2) {
                 result.setResult(HTTP_HEADERS, ValidationStatus.INVALID,
-                        "HTTP header array entries must have one key and one value: "
-                                + Arrays.deepToString(httpHeader));
+                    "HTTP header array entries must have one key and one value: " + Arrays.deepToString(httpHeader));
             } else if (!ParameterValidationUtils.validateStringParameter(httpHeader[0])) {
                 result.setResult(HTTP_HEADERS, ValidationStatus.INVALID,
-                        "HTTP header key is null or blank: " + Arrays.deepToString(httpHeader));
+                    "HTTP header key is null or blank: " + Arrays.deepToString(httpHeader));
             } else if (!ParameterValidationUtils.validateStringParameter(httpHeader[1])) {
                 result.setResult(HTTP_HEADERS, ValidationStatus.INVALID,
-                        "HTTP header value is null or blank: " + Arrays.deepToString(httpHeader));
+                    "HTTP header value is null or blank: " + Arrays.deepToString(httpHeader));
             }
         }
 
@@ -231,14 +232,13 @@
 
         } else if (StringUtils.isBlank(httpCodeFilter)) {
             result.setResult(HTTP_CODE_FILTER, ValidationStatus.INVALID,
-                    "HTTP code filter must be specified as a three digit regular expression");
+                "HTTP code filter must be specified as a three digit regular expression");
         } else {
             try {
                 Pattern.compile(httpCodeFilter);
             } catch (PatternSyntaxException pse) {
-                String message =
-                        "Invalid HTTP code filter, the filter must be specified as a three digit regular expression: "
-                                + pse.getMessage();
+                String message = "Invalid HTTP code filter, the filter must be specified as a three digit "
+                    + "regular expression: " + pse.getMessage();
                 result.setResult(HTTP_CODE_FILTER, ValidationStatus.INVALID, message);
                 LOGGER.debug(message, pse);
             }
@@ -253,6 +253,6 @@
     @Override
     public String toString() {
         return getLabel() + "CarrierTechnologyParameters [url=" + url + ", httpMethod=" + httpMethod + ", httpHeaders="
-                + Arrays.deepToString(httpHeaders) + ", httpCodeFilter=" + httpCodeFilter + "]";
+            + Arrays.deepToString(httpHeaders) + ", httpCodeFilter=" + httpCodeFilter + "]";
     }
 }
diff --git a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestExecutionPropertyRest.java b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestExecutionPropertyRest.java
index e483597..71c8833 100644
--- a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestExecutionPropertyRest.java
+++ b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestExecutionPropertyRest.java
@@ -63,8 +63,7 @@
     @BeforeClass
     public static void compilePolicy() {
         // @formatter:off
-        final String[] cliArgs = {
-            "-c",
+        final String[] cliArgs = { "-c",
             "src/test/resources/policies/executionproperties/policy/ExecutionPropertiesRestTestPolicyModel.apex",
             "-l",
             "target/ExecutionPropertiesRestTestPolicyModel.log",
@@ -88,7 +87,7 @@
         }
 
         server = HttpServletServerFactoryInstance.getServerFactory().build("TestExecutionPropertyRest", false, null,
-                PORT, "/TestExecutionRest", false, false);
+            PORT, "/TestExecutionRest", false, false);
 
         server.addServletClass(null, TestRestClientEndpoint.class.getName());
         server.setSerializationProvider(GsonMessageBodyHandler.class.getName());
@@ -129,7 +128,7 @@
         System.setOut(new PrintStream(outContent));
         System.setErr(new PrintStream(errContent));
 
-        final String[] args = {"src/test/resources/testdata/executionproperties/RESTEventBadUrl.json"};
+        final String[] args = { "src/test/resources/testdata/executionproperties/RESTEventBadUrl.json" };
         final ApexMain apexMain = new ApexMain(args);
 
         ThreadUtilities.sleep(500);
@@ -142,7 +141,8 @@
         System.setErr(stderr);
 
         LOGGER.info("testReplaceUrlTag-OUTSTRING=\n" + outString + "\nEnd-TagUrl");
-        assertTrue(outString.contains("no URL has been set for event sending on RESTCLIENT"));
+        assertTrue(outString.contains("invalid URL http://localhost:32801/TestExecutionRest/apex/event/tagId}"
+            + " has been set for event sending on RESTCLIENT"));
     }
 
     /**
@@ -153,7 +153,7 @@
         System.setOut(new PrintStream(outContent));
         System.setErr(new PrintStream(errContent));
 
-        final String[] args = {"src/test/resources/testdata/executionproperties/RESTEventNoValueSetForTag.json"};
+        final String[] args = { "src/test/resources/testdata/executionproperties/RESTEventNoValueSetForTag.json" };
         final ApexMain apexMain = new ApexMain(args);
 
         ThreadUtilities.sleep(2000);
@@ -167,7 +167,7 @@
 
         LOGGER.info("testReplaceUrlTag-OUTSTRING=\n" + outString + "\nEnd-TagUrl");
         assertTrue(outString.contains("key \"Number\" specified on url \"http://localhost:32801/TestExecutionRest/apex"
-                + "/event/{tagId}/{Number}\" not found in execution properties passed by the current policy"));
+            + "/event/{tagId}/{Number}\" not found in execution properties passed by the current policy"));
     }
 
     /**
@@ -178,7 +178,7 @@
         System.setOut(new PrintStream(outContent));
         System.setErr(new PrintStream(errContent));
 
-        final String[] args = {"src/test/resources/testdata/executionproperties/RESTEventBadHttpCodeFilter.json"};
+        final String[] args = { "src/test/resources/testdata/executionproperties/RESTEventBadHttpCodeFilter.json" };
         final ApexMain apexMain = new ApexMain(args);
 
         ThreadUtilities.sleep(500);
@@ -201,7 +201,8 @@
     public void testReplaceUrlTag() throws Exception {
         final Client client = ClientBuilder.newClient();
 
-        final String[] args = {"src/test/resources/testdata/executionproperties/RESTHttpCodeFilterSetToTagUrlOK.json"};
+        final String[] args = {
+            "src/test/resources/testdata/executionproperties/RESTHttpCodeFilterSetToTagUrlOK.json" };
         final ApexMain apexMain = new ApexMain(args);
         ThreadUtilities.sleep(1000);
         apexMain.shutdown();
@@ -212,7 +213,7 @@
 
         Response response = null;
         response = client.target("http://localhost:32801/TestExecutionRest/apex/event/GetProperUrl")
-                .request("application/json").get();
+            .request("application/json").get();
 
         LOGGER.info("testReplaceUrlTag-OUTSTRING=\n" + outString + "\nEnd-TagUrl");
         final String responseEntity = response.readEntity(String.class);
@@ -227,8 +228,7 @@
         final Client client = ClientBuilder.newClient();
         // @formatter:off
         final String[] args = {
-            "src/test/resources/testdata/executionproperties/RESTHttpCodeFilterSetToMultiTagUrlOK.json"
-        };
+            "src/test/resources/testdata/executionproperties/RESTHttpCodeFilterSetToMultiTagUrlOK.json" };
         // @formatter:on
         final ApexMain apexMain = new ApexMain(args);
         ThreadUtilities.sleep(1500);
@@ -238,7 +238,7 @@
         System.setErr(stderr);
         Response response = null;
         response = client.target("http://localhost:32801/TestExecutionRest/apex/event/GetProperUrl")
-                .request("application/json").get();
+            .request("application/json").get();
         final String responseEntity = response.readEntity(String.class);
         LOGGER.info("testReplaceUrlMultiTag-OUTSTRING=\n" + responseEntity + "\nEnd-MultiTagUrl");
         assertTrue(responseEntity.contains("\"PostProperUrl\": 3"));
