diff --git a/artifactbroker/main/src/test/java/org/onap/policy/distribution/main/parameters/CommonTestData.java b/artifactbroker/main/src/test/java/org/onap/policy/distribution/main/parameters/CommonTestData.java
new file mode 100644
index 0000000..7793873
--- /dev/null
+++ b/artifactbroker/main/src/test/java/org/onap/policy/distribution/main/parameters/CommonTestData.java
@@ -0,0 +1,180 @@
+/*-
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2018 Ericsson. 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.distribution.main.parameters;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.onap.policy.distribution.forwarding.parameters.ArtifactForwarderParameters;
+import org.onap.policy.distribution.main.testclasses.DummyArtifactForwarderParameterGroup;
+import org.onap.policy.distribution.main.testclasses.DummyArtifactForwarderParameterGroup.DummyArtifactForwarderParameterGroupBuilder;
+import org.onap.policy.distribution.main.testclasses.DummyReceptionHandlerParameterGroup;
+import org.onap.policy.distribution.main.testclasses.DummyReceptionHandlerParameterGroup.DummyReceptionHandlerParameterGroupBuilder;
+import org.onap.policy.distribution.reception.parameters.PluginHandlerParameters;
+import org.onap.policy.distribution.reception.parameters.ReceptionHandlerConfigurationParameterGroup;
+import org.onap.policy.distribution.reception.parameters.ReceptionHandlerParameters;
+
+/**
+ * Class to hold/create all parameters for test cases.
+ *
+ * @author Ram Krishna Verma (ram.krishna.verma@ericsson.com)
+ */
+public class CommonTestData {
+
+    private static final String REST_SERVER_PASSWORD = "zb!XztG34";
+    private static final String REST_SERVER_USER = "healthcheck";
+    private static final int REST_SERVER_PORT = 6969;
+    private static final String REST_SERVER_HOST = "0.0.0.0";
+    private static final boolean REST_SERVER_HTTPS = false;
+    public static final String DISTRIBUTION_GROUP_NAME = "SDCDistributionGroup";
+    public static final String FORWARDER_TYPE = "DummyForwarder";
+    public static final String FORWARDER_CLASS_NAME =
+            "org.onap.policy.distribution.main.testclasses.DummyArtifactForwarder";
+    public static final String FORWARDER_CONFIGURATION_PARAMETERS = "dummyConfiguration";
+    public static final String FORWARDER_HOST = "192.168.99.100";
+    public static final String RECEPTION_HANDLER_TYPE = "DummyReceptionHandler";
+    public static final String RECEPTION_HANDLER_CLASS_NAME =
+            "org.onap.policy.distribution.main.testclasses.DummyReceptionHandler";
+    public static final String RECEPTION_CONFIGURATION_PARAMETERS = "dummyReceptionHandlerConfiguration";
+    public static final String MY_STRING_PARAMETER_VALUE = "aStringValue";
+    public static final Boolean MY_BOOLEAN_PARAMETER_VALUE = true;
+    public static final int MY_INTEGER_PARAMETER_VALUE = 1234;
+
+    public static final String DUMMY_RECEPTION_HANDLER_KEY = "DummyReceptionHandler";
+    public static final String DUMMY_ENGINE_FORWARDER_KEY = "DummyForwarder";
+
+    public static final String POLICY_TYPE = "DUMMY";
+    public static final String POLICY_NAME = "SamplePolicy";
+
+    /**
+     * Returns an instance of ReceptionHandlerParameters for test cases.
+     *
+     * @param isEmpty boolean value to represent that object created should be empty or not
+     * @return the restServerParameters object
+     */
+    public RestServerParameters getRestServerParameters(final boolean isEmpty) {
+        final RestServerParameters restServerParameters;
+        if (!isEmpty) {
+            restServerParameters = new RestServerParameters(REST_SERVER_HOST, REST_SERVER_PORT, REST_SERVER_USER,
+                    REST_SERVER_PASSWORD, REST_SERVER_HTTPS);
+        } else {
+            restServerParameters = new RestServerParameters(null, 0, null, null, REST_SERVER_HTTPS);
+        }
+        return restServerParameters;
+    }
+
+    /**
+     * Returns an instance of ReceptionHandlerParameters for test cases.
+     *
+     * @param isEmpty boolean value to represent that object created should be empty or not
+     * @return the receptionHandlerParameters object
+     */
+    public Map<String, ReceptionHandlerParameters> getReceptionHandlerParameters(final boolean isEmpty) {
+        final Map<String, ReceptionHandlerParameters> receptionHandlerParameters =
+                new HashMap<String, ReceptionHandlerParameters>();
+        if (!isEmpty) {
+            final Map<String, ArtifactForwarderParameters> policyForwarders = getArtifactForwarders(isEmpty);
+            final PluginHandlerParameters pHParameters = new PluginHandlerParameters(policyForwarders);
+            final ReceptionHandlerParameters rhParameters = new ReceptionHandlerParameters(RECEPTION_HANDLER_TYPE,
+                    RECEPTION_HANDLER_CLASS_NAME, RECEPTION_CONFIGURATION_PARAMETERS, pHParameters);
+            receptionHandlerParameters.put(DUMMY_RECEPTION_HANDLER_KEY, rhParameters);
+        }
+        return receptionHandlerParameters;
+    }
+
+    /**
+     * Returns ReceptionHandlerConfigurationParameterGroups for test cases.
+     *
+     * @param isEmpty boolean value to represent that object created should be empty or not
+     * @return the ReceptionHandlerConfigurationParameterGroups
+     */
+    public Map<String, ReceptionHandlerConfigurationParameterGroup> getReceptionHandlerConfigurationParameters(
+            final boolean isEmpty) {
+        final Map<String, ReceptionHandlerConfigurationParameterGroup> receptionHandlerConfigurationParameters =
+                new HashMap<String, ReceptionHandlerConfigurationParameterGroup>();
+        if (!isEmpty) {
+            final List<String> messageBusAddress = new ArrayList<>();
+            messageBusAddress.add("localhost");
+            final List<String> artifactTypes = new ArrayList<>();
+            artifactTypes.add("TOSCA_CSAR");
+            final DummyReceptionHandlerParameterGroup dummyReceptionHandlerParameterGroup =
+                    new DummyReceptionHandlerParameterGroupBuilder().setMyStringParameter(MY_STRING_PARAMETER_VALUE)
+                            .setMyIntegerParameter(MY_INTEGER_PARAMETER_VALUE)
+                            .setMyBooleanParameter(MY_BOOLEAN_PARAMETER_VALUE).build();
+            receptionHandlerConfigurationParameters.put(RECEPTION_CONFIGURATION_PARAMETERS,
+                    dummyReceptionHandlerParameterGroup);
+        }
+        return receptionHandlerConfigurationParameters;
+    }
+
+    /**
+     * Returns an instance of PluginHandlerParameters for test cases.
+     *
+     * @param isEmpty boolean value to represent that object created should be empty or not
+     * @return the pluginHandlerParameters object
+     */
+    public PluginHandlerParameters getPluginHandlerParameters(final boolean isEmpty) {
+        final Map<String, ArtifactForwarderParameters> policyForwarders = getArtifactForwarders(isEmpty);
+        final PluginHandlerParameters pluginHandlerParameters =
+                new PluginHandlerParameters(policyForwarders);
+        return pluginHandlerParameters;
+    }
+
+    /**
+     * Returns an instance of ArtifactForwarderParameters for test cases.
+     *
+     * @param isEmpty boolean value to represent that object created should be empty or not
+     * @return the policyForwarders object
+     */
+    public Map<String, ArtifactForwarderParameters> getArtifactForwarders(final boolean isEmpty) {
+        final Map<String, ArtifactForwarderParameters> policyForwarders =
+                new HashMap<String, ArtifactForwarderParameters>();
+        if (!isEmpty) {
+            final ArtifactForwarderParameters pFParameters = new ArtifactForwarderParameters(FORWARDER_TYPE,
+                    FORWARDER_CLASS_NAME, FORWARDER_CONFIGURATION_PARAMETERS);
+            policyForwarders.put(DUMMY_ENGINE_FORWARDER_KEY, pFParameters);
+        }
+        return policyForwarders;
+    }
+
+    /**
+     * Returns ArtifactForwarderConfigurationParameterGroups for test cases.
+     *
+     * @param isEmpty boolean value to represent that object created should be empty or not
+     * @return the ArtifactForwarderConfigurationParameterGroups
+     */
+    public Map<String, ArtifactForwarderConfigurationParameterGroup> getArtifactForwarderConfigurationParameters(
+            final boolean isEmpty) {
+        final Map<String, ArtifactForwarderConfigurationParameterGroup> policyForwarderConfigurationParameters =
+                new HashMap<String, ArtifactForwarderConfigurationParameterGroup>();
+        if (!isEmpty) {
+            final DummyArtifactForwarderParameterGroup dummyArtifactForwarderParameterGroup =
+                    new DummyArtifactForwarderParameterGroupBuilder().setUseHttps(true).setHostname(FORWARDER_HOST)
+                            .setPort(1234).setUserName("myUser").setPassword("myPassword").setIsManaged(true).build();
+            policyForwarderConfigurationParameters.put(FORWARDER_CONFIGURATION_PARAMETERS,
+                    dummyArtifactForwarderParameterGroup);
+        }
+        return policyForwarderConfigurationParameters;
+    }
+
+}
diff --git a/artifactbroker/main/src/test/java/org/onap/policy/distribution/main/parameters/TestArtifactForwarderParameters.java b/artifactbroker/main/src/test/java/org/onap/policy/distribution/main/parameters/TestArtifactForwarderParameters.java
new file mode 100644
index 0000000..633ff44
--- /dev/null
+++ b/artifactbroker/main/src/test/java/org/onap/policy/distribution/main/parameters/TestArtifactForwarderParameters.java
@@ -0,0 +1,126 @@
+/*-
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2018 Ericsson. 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.distribution.main.parameters;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.onap.policy.distribution.main.parameters.CommonTestData.FORWARDER_CLASS_NAME;
+import static org.onap.policy.distribution.main.parameters.CommonTestData.FORWARDER_CONFIGURATION_PARAMETERS;
+import static org.onap.policy.distribution.main.parameters.CommonTestData.FORWARDER_TYPE;
+
+import org.junit.Test;
+import org.onap.policy.common.parameters.GroupValidationResult;
+import org.onap.policy.distribution.forwarding.parameters.ArtifactForwarderParameters;
+
+/**
+ * Class to perform unit test of ArtifactForwarderParameters.
+ *
+ * @author Ram Krishna Verma (ram.krishna.verma@ericsson.com)
+ */
+public class TestArtifactForwarderParameters {
+
+    @Test
+    public void testArtifactForwarderParameters() {
+        final ArtifactForwarderParameters pFParameters =
+                new ArtifactForwarderParameters(FORWARDER_TYPE, FORWARDER_CLASS_NAME, FORWARDER_CONFIGURATION_PARAMETERS);
+        final GroupValidationResult validationResult = pFParameters.validate();
+        assertEquals(FORWARDER_TYPE, pFParameters.getForwarderType());
+        assertEquals(FORWARDER_CLASS_NAME, pFParameters.getForwarderClassName());
+        assertTrue(validationResult.isValid());
+    }
+
+    @Test
+    public void testArtifactForwarderParameters_InvalidForwarderType() {
+        final ArtifactForwarderParameters pFParameters =
+                new ArtifactForwarderParameters("", FORWARDER_CLASS_NAME, FORWARDER_CONFIGURATION_PARAMETERS);
+        final GroupValidationResult validationResult = pFParameters.validate();
+        assertEquals("", pFParameters.getForwarderType());
+        assertEquals(FORWARDER_CLASS_NAME, pFParameters.getForwarderClassName());
+        assertFalse(validationResult.isValid());
+        assertTrue(validationResult.getResult().contains(
+                "field \"forwarderType\" type \"java.lang.String\" value \"\" INVALID, must be a non-blank string"));
+    }
+
+    @Test
+    public void testArtifactForwarderParameters_InvalidForwarderClassName() {
+        final ArtifactForwarderParameters pFParameters =
+                new ArtifactForwarderParameters(FORWARDER_TYPE, "", FORWARDER_CONFIGURATION_PARAMETERS);
+        final GroupValidationResult validationResult = pFParameters.validate();
+        assertEquals(CommonTestData.FORWARDER_TYPE, pFParameters.getForwarderType());
+        assertEquals("", pFParameters.getForwarderClassName());
+        assertFalse(validationResult.isValid());
+        assertTrue(validationResult.getResult()
+                .contains("field \"forwarderClassName\" type \"java.lang.String\" value \"\" INVALID, "
+                        + "must be a non-blank string containing full class name of the forwarder"));
+    }
+
+    @Test
+    public void testArtifactForwarderParameters_InvalidForwarderTypeAndClassName() {
+        final ArtifactForwarderParameters pFParameters =
+                new ArtifactForwarderParameters("", "", FORWARDER_CONFIGURATION_PARAMETERS);
+        final GroupValidationResult validationResult = pFParameters.validate();
+        assertEquals("", pFParameters.getForwarderType());
+        assertEquals("", pFParameters.getForwarderClassName());
+        assertFalse(validationResult.isValid());
+        assertTrue(validationResult.getResult().contains(
+                "field \"forwarderType\" type \"java.lang.String\" value \"\" INVALID, must be a non-blank string"));
+        assertTrue(validationResult.getResult()
+                .contains("field \"forwarderClassName\" type \"java.lang.String\" value \"\" INVALID, "
+                        + "must be a non-blank string containing full class name of the forwarder"));
+    }
+
+    @Test
+    public void testArtifactForwarderParameters_NullForwarderType() {
+        final ArtifactForwarderParameters pFParameters =
+                new ArtifactForwarderParameters(null, FORWARDER_CLASS_NAME, FORWARDER_CONFIGURATION_PARAMETERS);
+        final GroupValidationResult validationResult = pFParameters.validate();
+        assertEquals(null, pFParameters.getForwarderType());
+        assertEquals(FORWARDER_CLASS_NAME, pFParameters.getForwarderClassName());
+        assertFalse(validationResult.isValid());
+        assertTrue(validationResult.getResult()
+                .contains("field \"forwarderType\" type \"java.lang.String\" value \"null\" INVALID, "
+                        + "must be a non-blank string"));
+    }
+
+    @Test
+    public void testArtifactForwarderParameters_NullForwarderClassName() {
+        final ArtifactForwarderParameters pFParameters =
+                new ArtifactForwarderParameters(FORWARDER_TYPE, null, FORWARDER_CONFIGURATION_PARAMETERS);
+        final GroupValidationResult validationResult = pFParameters.validate();
+        assertEquals(FORWARDER_TYPE, pFParameters.getForwarderType());
+        assertEquals(null, pFParameters.getForwarderClassName());
+        assertFalse(validationResult.isValid());
+        assertTrue(validationResult.getResult()
+                .contains("field \"forwarderClassName\" type \"java.lang.String\" value \"null\" INVALID, "
+                        + "must be a non-blank string containing full class name of the forwarder"));
+    }
+
+    @Test
+    public void testArtifactForwarderParameters_InvalidForwarderClass() {
+        final ArtifactForwarderParameters pFParameters = new ArtifactForwarderParameters(FORWARDER_TYPE,
+                FORWARDER_CLASS_NAME + "Invalid", FORWARDER_CONFIGURATION_PARAMETERS);
+        final GroupValidationResult validationResult = pFParameters.validate();
+        assertEquals(FORWARDER_TYPE, pFParameters.getForwarderType());
+        assertEquals(FORWARDER_CLASS_NAME + "Invalid", pFParameters.getForwarderClassName());
+        assertFalse(validationResult.isValid());
+    }
+}
diff --git a/artifactbroker/main/src/test/java/org/onap/policy/distribution/main/parameters/TestDistributionParameterGroup.java b/artifactbroker/main/src/test/java/org/onap/policy/distribution/main/parameters/TestDistributionParameterGroup.java
new file mode 100644
index 0000000..505c34f
--- /dev/null
+++ b/artifactbroker/main/src/test/java/org/onap/policy/distribution/main/parameters/TestDistributionParameterGroup.java
@@ -0,0 +1,219 @@
+/*-
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2018 Ericsson. 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.distribution.main.parameters;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.util.Map;
+
+import org.junit.Test;
+import org.onap.policy.common.parameters.GroupValidationResult;
+import org.onap.policy.distribution.main.testclasses.DummyArtifactForwarderParameterGroup;
+import org.onap.policy.distribution.main.testclasses.DummyReceptionHandlerParameterGroup;
+import org.onap.policy.distribution.reception.parameters.ReceptionHandlerConfigurationParameterGroup;
+import org.onap.policy.distribution.reception.parameters.ReceptionHandlerParameters;
+
+/**
+ * Class to perform unit test of DistributionParameterGroup.
+ *
+ * @author Ram Krishna Verma (ram.krishna.verma@ericsson.com)
+ */
+public class TestDistributionParameterGroup {
+    CommonTestData commonTestData = new CommonTestData();
+
+    @Test
+    public void testDistributionParameterGroup() {
+        final RestServerParameters restServerParameters = commonTestData.getRestServerParameters(false);
+        final Map<String, ReceptionHandlerParameters> receptionHandlerParameters =
+                commonTestData.getReceptionHandlerParameters(false);
+        final Map<String, ReceptionHandlerConfigurationParameterGroup> receptionHandlerConfigurations =
+                commonTestData.getReceptionHandlerConfigurationParameters(false);
+        final Map<String, ArtifactForwarderConfigurationParameterGroup> forwarderConfigurations =
+                commonTestData.getArtifactForwarderConfigurationParameters(false);
+
+        final DistributionParameterGroup distributionParameters = new DistributionParameterGroup(
+                CommonTestData.DISTRIBUTION_GROUP_NAME, restServerParameters, receptionHandlerParameters,
+                receptionHandlerConfigurations, forwarderConfigurations);
+        final GroupValidationResult validationResult = distributionParameters.validate();
+        assertTrue(validationResult.isValid());
+        assertEquals(restServerParameters.getHost(), distributionParameters.getRestServerParameters().getHost());
+        assertEquals(restServerParameters.getPort(), distributionParameters.getRestServerParameters().getPort());
+        assertEquals(restServerParameters.getUserName(),
+                distributionParameters.getRestServerParameters().getUserName());
+        assertEquals(restServerParameters.getPassword(),
+                distributionParameters.getRestServerParameters().getPassword());
+        assertEquals(CommonTestData.DISTRIBUTION_GROUP_NAME, distributionParameters.getName());
+        assertEquals(
+                receptionHandlerParameters.get(CommonTestData.DUMMY_RECEPTION_HANDLER_KEY).getReceptionHandlerType(),
+                distributionParameters.getReceptionHandlerParameters().get(CommonTestData.DUMMY_RECEPTION_HANDLER_KEY)
+                        .getReceptionHandlerType());
+        assertEquals(
+                receptionHandlerParameters.get(CommonTestData.DUMMY_RECEPTION_HANDLER_KEY)
+                        .getReceptionHandlerClassName(),
+                distributionParameters.getReceptionHandlerParameters().get(CommonTestData.DUMMY_RECEPTION_HANDLER_KEY)
+                        .getReceptionHandlerClassName());
+        assertEquals(
+                receptionHandlerParameters.get(CommonTestData.DUMMY_RECEPTION_HANDLER_KEY).getPluginHandlerParameters(),
+                distributionParameters.getReceptionHandlerParameters().get(CommonTestData.DUMMY_RECEPTION_HANDLER_KEY)
+                        .getPluginHandlerParameters());
+        assertEquals(CommonTestData.MY_STRING_PARAMETER_VALUE,
+                ((DummyReceptionHandlerParameterGroup) distributionParameters
+                        .getReceptionHandlerConfigurationParameters()
+                        .get(CommonTestData.RECEPTION_CONFIGURATION_PARAMETERS)).getMyStringParameter());
+        assertEquals(CommonTestData.MY_INTEGER_PARAMETER_VALUE,
+                ((DummyReceptionHandlerParameterGroup) distributionParameters
+                        .getReceptionHandlerConfigurationParameters()
+                        .get(CommonTestData.RECEPTION_CONFIGURATION_PARAMETERS)).getMyIntegerParameter());
+        assertEquals(CommonTestData.MY_BOOLEAN_PARAMETER_VALUE,
+                ((DummyReceptionHandlerParameterGroup) distributionParameters
+                        .getReceptionHandlerConfigurationParameters()
+                        .get(CommonTestData.RECEPTION_CONFIGURATION_PARAMETERS)).isMyBooleanParameter());
+        assertEquals(CommonTestData.FORWARDER_HOST,
+                ((DummyArtifactForwarderParameterGroup) distributionParameters.getArtifactForwarderConfigurationParameters()
+                        .get(CommonTestData.FORWARDER_CONFIGURATION_PARAMETERS)).getHostname());
+    }
+
+    @Test
+    public void testDistributionParameterGroup_NullName() {
+        final RestServerParameters restServerParameters = commonTestData.getRestServerParameters(false);
+        final Map<String, ReceptionHandlerParameters> receptionHandlerParameters =
+                commonTestData.getReceptionHandlerParameters(false);
+        final Map<String, ReceptionHandlerConfigurationParameterGroup> receptionHandlerConfigurations =
+                commonTestData.getReceptionHandlerConfigurationParameters(false);
+        final Map<String, ArtifactForwarderConfigurationParameterGroup> forwarderConfigurations =
+                commonTestData.getArtifactForwarderConfigurationParameters(false);
+
+        final DistributionParameterGroup distributionParameters =
+                new DistributionParameterGroup(null, restServerParameters, receptionHandlerParameters,
+                        receptionHandlerConfigurations, forwarderConfigurations);
+        final GroupValidationResult validationResult = distributionParameters.validate();
+        assertFalse(validationResult.isValid());
+        assertEquals(null, distributionParameters.getName());
+        assertEquals(
+                receptionHandlerParameters.get(CommonTestData.DUMMY_RECEPTION_HANDLER_KEY).getReceptionHandlerType(),
+                distributionParameters.getReceptionHandlerParameters().get(CommonTestData.DUMMY_RECEPTION_HANDLER_KEY)
+                        .getReceptionHandlerType());
+        assertEquals(
+                receptionHandlerParameters.get(CommonTestData.DUMMY_RECEPTION_HANDLER_KEY)
+                        .getReceptionHandlerClassName(),
+                distributionParameters.getReceptionHandlerParameters().get(CommonTestData.DUMMY_RECEPTION_HANDLER_KEY)
+                        .getReceptionHandlerClassName());
+        assertEquals(
+                receptionHandlerParameters.get(CommonTestData.DUMMY_RECEPTION_HANDLER_KEY).getPluginHandlerParameters(),
+                distributionParameters.getReceptionHandlerParameters().get(CommonTestData.DUMMY_RECEPTION_HANDLER_KEY)
+                        .getPluginHandlerParameters());
+        assertTrue(validationResult.getResult().contains(
+                "field \"name\" type \"java.lang.String\" value \"null\" INVALID, " + "must be a non-blank string"));
+    }
+
+    @Test
+    public void testDistributionParameterGroup_EmptyName() {
+        final RestServerParameters restServerParameters = commonTestData.getRestServerParameters(false);
+        final Map<String, ReceptionHandlerParameters> receptionHandlerParameters =
+                commonTestData.getReceptionHandlerParameters(false);
+        final Map<String, ReceptionHandlerConfigurationParameterGroup> receptionHandlerConfigurations =
+                commonTestData.getReceptionHandlerConfigurationParameters(false);
+        final Map<String, ArtifactForwarderConfigurationParameterGroup> forwarderConfigurations =
+                commonTestData.getArtifactForwarderConfigurationParameters(false);
+
+        final DistributionParameterGroup distributionParameters =
+                new DistributionParameterGroup("", restServerParameters, receptionHandlerParameters,
+                        receptionHandlerConfigurations, forwarderConfigurations);
+        final GroupValidationResult validationResult = distributionParameters.validate();
+        assertFalse(validationResult.isValid());
+        assertEquals("", distributionParameters.getName());
+        assertEquals(
+                receptionHandlerParameters.get(CommonTestData.DUMMY_RECEPTION_HANDLER_KEY).getReceptionHandlerType(),
+                distributionParameters.getReceptionHandlerParameters().get(CommonTestData.DUMMY_RECEPTION_HANDLER_KEY)
+                        .getReceptionHandlerType());
+        assertEquals(
+                receptionHandlerParameters.get(CommonTestData.DUMMY_RECEPTION_HANDLER_KEY)
+                        .getReceptionHandlerClassName(),
+                distributionParameters.getReceptionHandlerParameters().get(CommonTestData.DUMMY_RECEPTION_HANDLER_KEY)
+                        .getReceptionHandlerClassName());
+        assertEquals(
+                receptionHandlerParameters.get(CommonTestData.DUMMY_RECEPTION_HANDLER_KEY).getPluginHandlerParameters(),
+                distributionParameters.getReceptionHandlerParameters().get(CommonTestData.DUMMY_RECEPTION_HANDLER_KEY)
+                        .getPluginHandlerParameters());
+        assertTrue(validationResult.getResult().contains(
+                "field \"name\" type \"java.lang.String\" value \"\" INVALID, " + "must be a non-blank string"));
+    }
+
+    @Test
+    public void testDistributionParameterGroup_NullReceptionHandlerParameters() {
+        final RestServerParameters restServerParameters = commonTestData.getRestServerParameters(false);
+        final Map<String, ReceptionHandlerConfigurationParameterGroup> receptionHandlerConfigurations =
+                commonTestData.getReceptionHandlerConfigurationParameters(false);
+        final Map<String, ArtifactForwarderConfigurationParameterGroup> forwarderConfigurations =
+                commonTestData.getArtifactForwarderConfigurationParameters(false);
+        try {
+            final DistributionParameterGroup distributionParameters =
+                    new DistributionParameterGroup(CommonTestData.DISTRIBUTION_GROUP_NAME, restServerParameters, null,
+                            receptionHandlerConfigurations, forwarderConfigurations);
+            distributionParameters.validate();
+            fail("test should throw an exception here");
+        } catch (final Exception e) {
+            assertTrue(e.getMessage().contains("map parameter \"receptionHandlerParameters\" is null"));
+        }
+
+    }
+
+    @Test
+    public void testDistributionParameterGroup_EmptyReceptionHandlerParameters() {
+        final RestServerParameters restServerParameters = commonTestData.getRestServerParameters(false);
+        final Map<String, ReceptionHandlerParameters> receptionHandlerParameters =
+                commonTestData.getReceptionHandlerParameters(true);
+        final Map<String, ReceptionHandlerConfigurationParameterGroup> receptionHandlerConfigurations =
+                commonTestData.getReceptionHandlerConfigurationParameters(false);
+        final Map<String, ArtifactForwarderConfigurationParameterGroup> forwarderConfigurations =
+                commonTestData.getArtifactForwarderConfigurationParameters(false);
+        final DistributionParameterGroup distributionParameters = new DistributionParameterGroup(
+                CommonTestData.DISTRIBUTION_GROUP_NAME, restServerParameters, receptionHandlerParameters,
+                receptionHandlerConfigurations, forwarderConfigurations);
+        distributionParameters.validate();
+        final GroupValidationResult result = distributionParameters.validate();
+        assertFalse(result.isValid());
+        assertTrue(result.getResult().endsWith("must have at least one reception handler\n"));
+    }
+
+    @Test
+    public void testDistributionParameterGroup_EmptyRestServerParameters() {
+        final RestServerParameters restServerParameters = commonTestData.getRestServerParameters(true);
+        final Map<String, ReceptionHandlerParameters> receptionHandlerParameters =
+                commonTestData.getReceptionHandlerParameters(false);
+        final Map<String, ReceptionHandlerConfigurationParameterGroup> receptionHandlerConfigurations =
+                commonTestData.getReceptionHandlerConfigurationParameters(false);
+        final Map<String, ArtifactForwarderConfigurationParameterGroup> forwarderConfigurations =
+                commonTestData.getArtifactForwarderConfigurationParameters(false);
+
+        final DistributionParameterGroup distributionParameters = new DistributionParameterGroup(
+                CommonTestData.DISTRIBUTION_GROUP_NAME, restServerParameters, receptionHandlerParameters,
+                receptionHandlerConfigurations, forwarderConfigurations);
+        final GroupValidationResult validationResult = distributionParameters.validate();
+        assertFalse(validationResult.isValid());
+        assertTrue(validationResult.getResult()
+                .contains("\"org.onap.policy.distribution.main.parameters.RestServerParameters\" INVALID, "
+                        + "parameter group has status INVALID"));
+    }
+}
diff --git a/artifactbroker/main/src/test/java/org/onap/policy/distribution/main/parameters/TestDistributionParameterHandler.java b/artifactbroker/main/src/test/java/org/onap/policy/distribution/main/parameters/TestDistributionParameterHandler.java
new file mode 100644
index 0000000..17faf33
--- /dev/null
+++ b/artifactbroker/main/src/test/java/org/onap/policy/distribution/main/parameters/TestDistributionParameterHandler.java
@@ -0,0 +1,377 @@
+/*-
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2018 Ericsson. 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.distribution.main.parameters;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+import org.junit.Test;
+import org.onap.policy.distribution.main.PolicyDistributionException;
+import org.onap.policy.distribution.main.startstop.DistributionCommandLineArguments;
+import org.onap.policy.distribution.main.testclasses.DummyArtifactForwarderParameterGroup;
+
+/**
+ * Class to perform unit test of DistributionParameterHandler.
+ *
+ * @author Ram Krishna Verma (ram.krishna.verma@ericsson.com)
+ */
+public class TestDistributionParameterHandler {
+    @Test
+    public void testParameterHandlerNoParameterFile() throws PolicyDistributionException {
+        final String[] noArgumentString =
+            { "-c", "parameters/NoParameterFile.json" };
+
+        final DistributionCommandLineArguments noArguments = new DistributionCommandLineArguments();
+        noArguments.parse(noArgumentString);
+
+        try {
+            new DistributionParameterHandler().getParameters(noArguments);
+            fail("test should throw an exception here");
+        } catch (final Exception e) {
+            assertTrue(e.getMessage().contains("FileNotFoundException"));
+        }
+    }
+
+    @Test
+    public void testParameterHandlerEmptyParameters() throws PolicyDistributionException {
+        final String[] emptyArgumentString =
+            { "-c", "parameters/EmptyParameters.json" };
+
+        final DistributionCommandLineArguments emptyArguments = new DistributionCommandLineArguments();
+        emptyArguments.parse(emptyArgumentString);
+
+        try {
+            new DistributionParameterHandler().getParameters(emptyArguments);
+            fail("test should throw an exception here");
+        } catch (final Exception e) {
+            assertEquals("no parameters found in \"parameters/EmptyParameters.json\"", e.getMessage());
+        }
+    }
+
+    @Test
+    public void testParameterHandlerBadParameters() throws PolicyDistributionException {
+        final String[] badArgumentString =
+            { "-c", "parameters/BadParameters.json" };
+
+        final DistributionCommandLineArguments badArguments = new DistributionCommandLineArguments();
+        badArguments.parse(badArgumentString);
+
+        try {
+            new DistributionParameterHandler().getParameters(badArguments);
+            fail("test should throw an exception here");
+        } catch (final Exception e) {
+            assertEquals("error reading parameters from \"parameters/BadParameters.json\"\n"
+                    + "(JsonSyntaxException):java.lang.IllegalStateException: "
+                    + "Expected a string but was BEGIN_ARRAY at line 2 column 15 path $.name", e.getMessage());
+        }
+    }
+
+    @Test
+    public void testParameterHandlerInvalidParameters() throws PolicyDistributionException {
+        final String[] invalidArgumentString =
+            { "-c", "parameters/InvalidParameters.json" };
+
+        final DistributionCommandLineArguments invalidArguments = new DistributionCommandLineArguments();
+        invalidArguments.parse(invalidArgumentString);
+
+        try {
+            new DistributionParameterHandler().getParameters(invalidArguments);
+            fail("test should throw an exception here");
+        } catch (final Exception e) {
+            assertEquals("error reading parameters from \"parameters/InvalidParameters.json\"\n"
+                    + "(JsonSyntaxException):java.lang.IllegalStateException: "
+                    + "Expected a string but was BEGIN_ARRAY at line 2 column 15 path $.name", e.getMessage());
+        }
+    }
+
+    @Test
+    public void testParameterHandlerNoParameters() throws PolicyDistributionException {
+        final String[] noArgumentString =
+            { "-c", "parameters/NoParameters.json" };
+
+        final DistributionCommandLineArguments noArguments = new DistributionCommandLineArguments();
+        noArguments.parse(noArgumentString);
+
+        try {
+            new DistributionParameterHandler().getParameters(noArguments);
+            fail("test should throw an exception here");
+        } catch (final Exception e) {
+            assertEquals("map parameter \"receptionHandlerParameters\" is null", e.getMessage());
+        }
+    }
+
+    @Test
+    public void testParameterHandlerMinumumParameters() throws PolicyDistributionException {
+        final String[] minArgumentString =
+            { "-c", "parameters/MinimumParameters.json" };
+
+        final DistributionCommandLineArguments minArguments = new DistributionCommandLineArguments();
+        minArguments.parse(minArgumentString);
+
+        //final DistributionParameterGroup parGroup = new DistributionParameterHandler().getParameters(minArguments);
+        //assertEquals(CommonTestData.DISTRIBUTION_GROUP_NAME, parGroup.getName());
+    }
+
+    @Test
+    public void testDistributionParameterGroup() throws PolicyDistributionException {
+        final String[] distributionConfigParameters =
+            { "-c", "parameters/DistributionConfigParameters.json" };
+
+        final DistributionCommandLineArguments arguments = new DistributionCommandLineArguments();
+        arguments.parse(distributionConfigParameters);
+
+        final DistributionParameterGroup parGroup = new DistributionParameterHandler().getParameters(arguments);
+        assertTrue(arguments.checkSetConfigurationFilePath());
+        assertEquals(CommonTestData.DISTRIBUTION_GROUP_NAME, parGroup.getName());
+        assertEquals(CommonTestData.RECEPTION_HANDLER_TYPE, parGroup.getReceptionHandlerParameters()
+                .get(CommonTestData.DUMMY_RECEPTION_HANDLER_KEY).getReceptionHandlerType());
+        assertEquals(CommonTestData.FORWARDER_TYPE,
+                parGroup.getReceptionHandlerParameters().get(CommonTestData.DUMMY_RECEPTION_HANDLER_KEY)
+                        .getPluginHandlerParameters().getArtifactForwarders()
+                        .get(CommonTestData.DUMMY_ENGINE_FORWARDER_KEY).getForwarderType());
+        assertEquals(CommonTestData.FORWARDER_HOST,
+                ((DummyArtifactForwarderParameterGroup) parGroup.getArtifactForwarderConfigurationParameters()
+                        .get(CommonTestData.FORWARDER_CONFIGURATION_PARAMETERS)).getHostname());
+    }
+
+    @Test
+    public void testDistributionParameterGroup_InvalidForwarderConfigurationClassName()
+            throws PolicyDistributionException {
+        final String[] distributionConfigParameters =
+            { "-c", "parameters/DistributionConfigParameters_InvalidForwarderConfigurationClassName.json" };
+
+        final DistributionCommandLineArguments arguments = new DistributionCommandLineArguments();
+        arguments.parse(distributionConfigParameters);
+
+        try {
+            new DistributionParameterHandler().getParameters(arguments);
+            fail("test should throw an exception here");
+        } catch (final Exception e) {
+            assertTrue(e.getMessage().contains("parameter \"parameterClassName\" value \"\" invalid in JSON file"));
+        }
+    }
+
+    @Test
+    public void testDistributionParameterGroup_UnknownForwarderConfigurationClassName()
+            throws PolicyDistributionException {
+        final String[] distributionConfigParameters =
+            { "-c", "parameters/DistributionConfigParameters_UnknownForwarderConfigurationClassName.json" };
+
+        final DistributionCommandLineArguments arguments = new DistributionCommandLineArguments();
+        arguments.parse(distributionConfigParameters);
+
+        try {
+            new DistributionParameterHandler().getParameters(arguments);
+            fail("test should throw an exception here");
+        } catch (final Exception e) {
+            assertTrue(e.getMessage().contains(
+                    "parameter \"parameterClassName\" value \"org.onap.policy.Unknown\", could not find class"));
+        }
+    }
+
+    @Test
+    public void testDistributionParameterGroup_InvalidName() throws PolicyDistributionException {
+        final String[] distributionConfigParameters =
+            { "-c", "parameters/DistributionConfigParameters_InvalidName.json" };
+
+        final DistributionCommandLineArguments arguments = new DistributionCommandLineArguments();
+        arguments.parse(distributionConfigParameters);
+
+        try {
+            new DistributionParameterHandler().getParameters(arguments);
+            fail("test should throw an exception here");
+        } catch (final Exception e) {
+            assertTrue(e.getMessage().contains(
+                    "field \"name\" type \"java.lang.String\" value \" \" INVALID, must be a non-blank string"));
+        }
+    }
+
+    @Test
+    public void testDistributionParameterGroup_NoReceptionHandler() throws PolicyDistributionException {
+        final String[] distributionConfigParameters =
+            { "-c", "parameters/DistributionConfigParameters_NoReceptionHandler.json" };
+
+        final DistributionCommandLineArguments arguments = new DistributionCommandLineArguments();
+        arguments.parse(distributionConfigParameters);
+
+        try {
+            new DistributionParameterHandler().getParameters(arguments);
+            fail("test should throw an exception here");
+        } catch (final Exception e) {
+            assertTrue(e.getMessage().contains("map parameter \"receptionHandlerParameters\" is null"));
+        }
+    }
+
+    @Test
+    public void testDistributionParameterGroup_EmptyReceptionHandler() throws PolicyDistributionException {
+        final String[] distributionConfigParameters =
+            { "-c", "parameters/DistributionConfigParameters_EmptyReceptionHandler.json" };
+
+        final DistributionCommandLineArguments arguments = new DistributionCommandLineArguments();
+        arguments.parse(distributionConfigParameters);
+
+        try {
+            new DistributionParameterHandler().getParameters(arguments);
+            fail("test should throw an exception here");
+        } catch (final Exception e) {
+            assertTrue(e.getMessage().contains("must have at least one reception handler\n"));
+        }
+    }
+
+    @Test
+    public void testDistributionParameterGroup_NoArtifactForwarder() throws PolicyDistributionException {
+        final String[] distributionConfigParameters =
+            { "-c", "parameters/DistributionConfigParameters_NoArtifactForwarder.json" };
+
+        final DistributionCommandLineArguments arguments = new DistributionCommandLineArguments();
+        arguments.parse(distributionConfigParameters);
+
+        try {
+            new DistributionParameterHandler().getParameters(arguments);
+            fail("test should throw an exception here");
+        } catch (final Exception e) {
+            assertTrue(e.getMessage().contains("map parameter \"artifactForwarders\" is null"));
+        }
+    }
+
+    @Test
+    public void testDistributionParameterGroup_EmptyArtifactForwarder() throws PolicyDistributionException {
+        final String[] distributionConfigParameters =
+            { "-c", "parameters/DistributionConfigParameters_EmptyArtifactForwarder.json" };
+
+        final DistributionCommandLineArguments arguments = new DistributionCommandLineArguments();
+        arguments.parse(distributionConfigParameters);
+
+        try {
+            new DistributionParameterHandler().getParameters(arguments);
+            fail("test should throw an exception here");
+        } catch (final Exception e) {
+            System.out.println("libo result is " + e.getMessage());
+            assertTrue(e.getMessage().endsWith("must have at least one policy forwarder\n"));
+        }
+    }
+
+    @Test
+    public void testDistributionParameterGroup_InvalidReceptionHandlerParameters()
+            throws PolicyDistributionException, IOException {
+        final String[] distributionConfigParameters =
+            { "-c", "parameters/DistributionConfigParameters_InvalidReceptionHandlerParameters.json" };
+
+        final DistributionCommandLineArguments arguments = new DistributionCommandLineArguments();
+        arguments.parse(distributionConfigParameters);
+
+        try {
+            new DistributionParameterHandler().getParameters(arguments);
+            fail("test should throw an exception here");
+        } catch (final Exception e) {
+            final String expectedResult = new String(Files.readAllBytes(
+                    Paths.get("src/test/resources/expectedValidationResults/InvalidReceptionHandlerParameters.txt")))
+                            .replaceAll("\\s+", "");
+            assertEquals(expectedResult, e.getMessage().replaceAll("\\s+", ""));
+        }
+    }
+
+    @Test
+    public void testDistributionParameterGroup_InvalidRestServerParameters()
+            throws PolicyDistributionException, IOException {
+        final String[] distributionConfigParameters =
+            { "-c", "parameters/DistributionConfigParameters_InvalidRestServerParameters.json" };
+
+        final DistributionCommandLineArguments arguments = new DistributionCommandLineArguments();
+        arguments.parse(distributionConfigParameters);
+
+        try {
+            new DistributionParameterHandler().getParameters(arguments);
+            fail("test should throw an exception here");
+        } catch (final Exception e) {
+            final String expectedResult = new String(Files.readAllBytes(
+                    Paths.get("src/test/resources/expectedValidationResults/InvalidRestServerParameters.txt")))
+                            .replaceAll("\\s+", "");
+            assertEquals(expectedResult, e.getMessage().replaceAll("\\s+", ""));
+        }
+    }
+
+    @Test
+    public void testDistributionVersion() throws PolicyDistributionException {
+        final String[] distributionConfigParameters =
+            { "-v" };
+        final DistributionCommandLineArguments arguments = new DistributionCommandLineArguments();
+        final String version = arguments.parse(distributionConfigParameters);
+        assertTrue(version.startsWith("ONAP Policy Framework Distribution Service"));
+    }
+
+    @Test
+    public void testDistributionHelp() throws PolicyDistributionException {
+        final String[] distributionConfigParameters =
+            { "-h" };
+        final DistributionCommandLineArguments arguments = new DistributionCommandLineArguments();
+        final String help = arguments.parse(distributionConfigParameters);
+        assertTrue(help.startsWith("usage:"));
+    }
+
+    @Test
+    public void testDistributionInvalidOption() throws PolicyDistributionException {
+        final String[] distributionConfigParameters =
+            { "-d" };
+        final DistributionCommandLineArguments arguments = new DistributionCommandLineArguments();
+        try {
+            arguments.parse(distributionConfigParameters);
+        } catch (final Exception exp) {
+            assertTrue(exp.getMessage().startsWith("invalid command line arguments specified"));
+        }
+    }
+
+    @Test
+    public void testDistributionParameterGroup_InvalidReceptionHandlerClass() throws PolicyDistributionException {
+        final String[] distributionConfigParameters =
+            { "-c", "parameters/DistributionConfigParameters_InvalidReceptionHandlerClass.json" };
+
+        final DistributionCommandLineArguments arguments = new DistributionCommandLineArguments();
+        arguments.parse(distributionConfigParameters);
+
+        try {
+            new DistributionParameterHandler().getParameters(arguments);
+        } catch (final Exception e) {
+            assertTrue(e.getMessage().contains("could not find class"));
+        }
+    }
+
+    @Test
+    public void testDistributionParameterGroup_EmptyReceptionHandlerClass() throws PolicyDistributionException {
+        final String[] distributionConfigParameters =
+            { "-c", "parameters/DistributionConfigParameters_EmptyReceptionHandlerClass.json" };
+
+        final DistributionCommandLineArguments arguments = new DistributionCommandLineArguments();
+        arguments.parse(distributionConfigParameters);
+
+        try {
+            new DistributionParameterHandler().getParameters(arguments);
+        } catch (final Exception e) {
+            assertTrue(e.getMessage().contains("invalid in JSON file"));
+        }
+    }
+
+}
diff --git a/artifactbroker/main/src/test/java/org/onap/policy/distribution/main/parameters/TestPluginHandlerParameters.java b/artifactbroker/main/src/test/java/org/onap/policy/distribution/main/parameters/TestPluginHandlerParameters.java
new file mode 100644
index 0000000..6df7705
--- /dev/null
+++ b/artifactbroker/main/src/test/java/org/onap/policy/distribution/main/parameters/TestPluginHandlerParameters.java
@@ -0,0 +1,60 @@
+/*-
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2018 Ericsson. 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.distribution.main.parameters;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.util.Map;
+import org.junit.Test;
+import org.onap.policy.common.parameters.GroupValidationResult;
+import org.onap.policy.distribution.forwarding.parameters.ArtifactForwarderParameters;
+import org.onap.policy.distribution.reception.parameters.PluginHandlerParameters;
+
+/**
+ * Class to perform unit test of PluginHandlerParameters.
+ *
+ * @author Ram Krishna Verma (ram.krishna.verma@ericsson.com)
+ */
+public class TestPluginHandlerParameters {
+    CommonTestData commonTestData = new CommonTestData();
+
+    @Test
+    public void testPluginHandlerParameters() {
+        final Map<String, ArtifactForwarderParameters> policyForwarders = commonTestData.getArtifactForwarders(false);
+        final PluginHandlerParameters pHParameters = new PluginHandlerParameters(policyForwarders);
+        final GroupValidationResult validationResult = pHParameters.validate();
+        assertEquals(policyForwarders.get(CommonTestData.DUMMY_ENGINE_FORWARDER_KEY),
+                        pHParameters.getArtifactForwarders().get(CommonTestData.DUMMY_ENGINE_FORWARDER_KEY));
+        assertTrue(validationResult.isValid());
+    }
+
+    @Test
+    public void testPluginHandlerParameters_EmptyArtifactForwarders() {
+        final Map<String, ArtifactForwarderParameters> policyForwarders = commonTestData.getArtifactForwarders(true);
+        final PluginHandlerParameters pHParameters = new PluginHandlerParameters(policyForwarders);
+        GroupValidationResult result = pHParameters.validate();
+        assertFalse(result.isValid());
+        assertTrue(result.getResult().endsWith("must have at least one policy forwarder\n"));
+    }
+}
diff --git a/artifactbroker/main/src/test/java/org/onap/policy/distribution/main/parameters/TestReceptionHandlerParameters.java b/artifactbroker/main/src/test/java/org/onap/policy/distribution/main/parameters/TestReceptionHandlerParameters.java
new file mode 100644
index 0000000..2dde966
--- /dev/null
+++ b/artifactbroker/main/src/test/java/org/onap/policy/distribution/main/parameters/TestReceptionHandlerParameters.java
@@ -0,0 +1,153 @@
+/*-
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2018 Ericsson. 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.distribution.main.parameters;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+import org.onap.policy.common.parameters.GroupValidationResult;
+import org.onap.policy.distribution.reception.parameters.PluginHandlerParameters;
+import org.onap.policy.distribution.reception.parameters.ReceptionHandlerParameters;
+
+/**
+ * Class to perform unit test of ReceptionHandlerParameters.
+ *
+ * @author Ram Krishna Verma (ram.krishna.verma@ericsson.com)
+ */
+public class TestReceptionHandlerParameters {
+    CommonTestData commonTestData = new CommonTestData();
+
+    @Test
+    public void testReceptionHandlerParameters() {
+        final PluginHandlerParameters pHParameters = commonTestData.getPluginHandlerParameters(false);
+        final ReceptionHandlerParameters rHParameters = new ReceptionHandlerParameters(
+                CommonTestData.RECEPTION_HANDLER_TYPE, CommonTestData.RECEPTION_HANDLER_CLASS_NAME,
+                CommonTestData.RECEPTION_CONFIGURATION_PARAMETERS, pHParameters);
+        final GroupValidationResult validationResult = rHParameters.validate();
+        assertEquals(CommonTestData.RECEPTION_HANDLER_TYPE, rHParameters.getReceptionHandlerType());
+        assertEquals(CommonTestData.RECEPTION_HANDLER_CLASS_NAME, rHParameters.getReceptionHandlerClassName());
+        assertEquals(CommonTestData.RECEPTION_CONFIGURATION_PARAMETERS,
+                rHParameters.getReceptionHandlerConfigurationName());
+        assertEquals(pHParameters, rHParameters.getPluginHandlerParameters());
+        assertTrue(validationResult.isValid());
+    }
+
+    @Test
+    public void testReceptionHandlerParameters_NullReceptionHandlerType() {
+        final PluginHandlerParameters pHParameters = commonTestData.getPluginHandlerParameters(false);
+        final ReceptionHandlerParameters rHParameters =
+                new ReceptionHandlerParameters(null, CommonTestData.RECEPTION_HANDLER_CLASS_NAME,
+                        CommonTestData.RECEPTION_CONFIGURATION_PARAMETERS, pHParameters);
+        final GroupValidationResult validationResult = rHParameters.validate();
+        assertEquals(null, rHParameters.getReceptionHandlerType());
+        assertEquals(CommonTestData.RECEPTION_HANDLER_CLASS_NAME, rHParameters.getReceptionHandlerClassName());
+        assertEquals(CommonTestData.RECEPTION_CONFIGURATION_PARAMETERS,
+                rHParameters.getReceptionHandlerConfigurationName());
+        assertEquals(pHParameters, rHParameters.getPluginHandlerParameters());
+        assertFalse(validationResult.isValid());
+        assertTrue(validationResult.getResult()
+                .contains("field \"receptionHandlerType\" type \"java.lang.String\" value \"null\" INVALID, "
+                        + "must be a non-blank string"));
+    }
+
+    @Test
+    public void testReceptionHandlerParameters_NullReceptionHandlerClassName() {
+        final PluginHandlerParameters pHParameters = commonTestData.getPluginHandlerParameters(false);
+        final ReceptionHandlerParameters rHParameters =
+                new ReceptionHandlerParameters(CommonTestData.RECEPTION_HANDLER_TYPE, null,
+                        CommonTestData.RECEPTION_CONFIGURATION_PARAMETERS, pHParameters);
+        final GroupValidationResult validationResult = rHParameters.validate();
+        assertEquals(CommonTestData.RECEPTION_HANDLER_TYPE, rHParameters.getReceptionHandlerType());
+        assertEquals(null, rHParameters.getReceptionHandlerClassName());
+        assertEquals(CommonTestData.RECEPTION_CONFIGURATION_PARAMETERS,
+                rHParameters.getReceptionHandlerConfigurationName());
+        assertEquals(pHParameters, rHParameters.getPluginHandlerParameters());
+        assertFalse(validationResult.isValid());
+        assertTrue(validationResult.getResult()
+                .contains("field \"receptionHandlerClassName\" type \"java.lang.String\" value \"null\" INVALID, "
+                        + "must be a non-blank string containing full class name " + "of the reception handler"));
+    }
+
+    @Test
+    public void testReceptionHandlerParameters_EmptyReceptionHandlerType() {
+        final PluginHandlerParameters pHParameters = commonTestData.getPluginHandlerParameters(false);
+        final ReceptionHandlerParameters rHParameters =
+                new ReceptionHandlerParameters("", CommonTestData.RECEPTION_HANDLER_CLASS_NAME,
+                        CommonTestData.RECEPTION_CONFIGURATION_PARAMETERS, pHParameters);
+        final GroupValidationResult validationResult = rHParameters.validate();
+        assertEquals("", rHParameters.getReceptionHandlerType());
+        assertEquals(CommonTestData.RECEPTION_HANDLER_CLASS_NAME, rHParameters.getReceptionHandlerClassName());
+        assertEquals(pHParameters, rHParameters.getPluginHandlerParameters());
+        assertFalse(validationResult.isValid());
+        assertTrue(validationResult.getResult()
+                .contains("field \"receptionHandlerType\" type \"java.lang.String\" value \"\" INVALID, "
+                        + "must be a non-blank string"));
+    }
+
+    @Test
+    public void testReceptionHandlerParameters_EmptyReceptionHandlerClassName() {
+        final PluginHandlerParameters pHParameters = commonTestData.getPluginHandlerParameters(false);
+        final ReceptionHandlerParameters rHParameters =
+                new ReceptionHandlerParameters(CommonTestData.RECEPTION_HANDLER_TYPE, "",
+                        CommonTestData.RECEPTION_CONFIGURATION_PARAMETERS, pHParameters);
+        final GroupValidationResult validationResult = rHParameters.validate();
+        assertEquals(CommonTestData.RECEPTION_HANDLER_TYPE, rHParameters.getReceptionHandlerType());
+        assertEquals("", rHParameters.getReceptionHandlerClassName());
+        assertEquals(CommonTestData.RECEPTION_CONFIGURATION_PARAMETERS,
+                rHParameters.getReceptionHandlerConfigurationName());
+        assertEquals(pHParameters, rHParameters.getPluginHandlerParameters());
+        assertFalse(validationResult.isValid());
+        assertTrue(validationResult.getResult()
+                .contains("field \"receptionHandlerClassName\" type \"java.lang.String\" value \"\" INVALID, "
+                        + "must be a non-blank string containing full class name " + "of the reception handler"));
+    }
+
+    @Test
+    public void testReceptionHandlerParameters_EmptyPluginHandler() {
+        final PluginHandlerParameters pHParameters = commonTestData.getPluginHandlerParameters(true);
+        final ReceptionHandlerParameters rHParameters = new ReceptionHandlerParameters(
+                CommonTestData.RECEPTION_HANDLER_TYPE, CommonTestData.RECEPTION_HANDLER_CLASS_NAME,
+                CommonTestData.RECEPTION_CONFIGURATION_PARAMETERS, pHParameters);
+        GroupValidationResult result = rHParameters.validate();
+        assertFalse(result.isValid());
+        assertTrue(result.getResult().endsWith("must have at least one policy forwarder\n"));
+    }
+
+    @Test
+    public void testReceptionHandlerParameters_InvalidReceptionHandlerClass() {
+        final PluginHandlerParameters pHParameters = commonTestData.getPluginHandlerParameters(false);
+
+        final ReceptionHandlerParameters rHParameters = new ReceptionHandlerParameters(
+                CommonTestData.RECEPTION_HANDLER_TYPE, CommonTestData.RECEPTION_HANDLER_CLASS_NAME + "Invalid",
+                CommonTestData.RECEPTION_CONFIGURATION_PARAMETERS, pHParameters);
+        final GroupValidationResult validationResult = rHParameters.validate();
+        assertEquals(CommonTestData.RECEPTION_HANDLER_TYPE, rHParameters.getReceptionHandlerType());
+        assertEquals(CommonTestData.RECEPTION_HANDLER_CLASS_NAME + "Invalid",
+                rHParameters.getReceptionHandlerClassName());
+        assertEquals(CommonTestData.RECEPTION_CONFIGURATION_PARAMETERS,
+                rHParameters.getReceptionHandlerConfigurationName());
+        assertEquals(pHParameters, rHParameters.getPluginHandlerParameters());
+        assertFalse(validationResult.isValid());
+        assertTrue(validationResult.getResult().contains("reception handler class not found in classpath"));
+    }
+}
diff --git a/artifactbroker/main/src/test/java/org/onap/policy/distribution/main/startstop/TestDistributionActivator.java b/artifactbroker/main/src/test/java/org/onap/policy/distribution/main/startstop/TestDistributionActivator.java
new file mode 100644
index 0000000..a6d04e5
--- /dev/null
+++ b/artifactbroker/main/src/test/java/org/onap/policy/distribution/main/startstop/TestDistributionActivator.java
@@ -0,0 +1,68 @@
+/*-
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2018 Ericsson. 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.distribution.main.startstop;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+import org.onap.policy.distribution.main.PolicyDistributionException;
+import org.onap.policy.distribution.main.parameters.CommonTestData;
+import org.onap.policy.distribution.main.parameters.DistributionParameterGroup;
+import org.onap.policy.distribution.main.parameters.DistributionParameterHandler;
+import org.onap.policy.distribution.main.testclasses.DummyArtifactForwarderParameterGroup;
+
+/**
+ * Class to perform unit test of DistributionActivator.
+ *
+ * @author Ram Krishna Verma (ram.krishna.verma@ericsson.com)
+ */
+public class TestDistributionActivator {
+
+    @Test
+    public void testDistributionActivator() throws PolicyDistributionException {
+        final String[] distributionConfigParameters = {"-c", "parameters/DistributionConfigParameters.json"};
+
+        final DistributionCommandLineArguments arguments =
+                new DistributionCommandLineArguments(distributionConfigParameters);
+
+        final DistributionParameterGroup parGroup = new DistributionParameterHandler().getParameters(arguments);
+
+        final DistributionActivator activator = new DistributionActivator(parGroup);
+        activator.initialize();
+        assertTrue(activator.getParameterGroup().isValid());
+        assertTrue(DistributionActivator.isAlive());
+        assertEquals(CommonTestData.DISTRIBUTION_GROUP_NAME, activator.getParameterGroup().getName());
+        assertEquals(CommonTestData.RECEPTION_HANDLER_TYPE,
+                activator.getParameterGroup().getReceptionHandlerParameters()
+                        .get(CommonTestData.DUMMY_RECEPTION_HANDLER_KEY).getReceptionHandlerType());
+        assertEquals(CommonTestData.FORWARDER_TYPE,
+                activator.getParameterGroup().getReceptionHandlerParameters()
+                        .get(CommonTestData.DUMMY_RECEPTION_HANDLER_KEY).getPluginHandlerParameters()
+                        .getArtifactForwarders().get(CommonTestData.DUMMY_ENGINE_FORWARDER_KEY).getForwarderType());
+        assertEquals(DummyArtifactForwarderParameterGroup.class,
+                activator.getParameterGroup().getArtifactForwarderConfigurationParameters()
+                        .get(CommonTestData.FORWARDER_CONFIGURATION_PARAMETERS).getClass());
+        activator.terminate();
+        assertFalse(DistributionActivator.isAlive());
+    }
+}
diff --git a/artifactbroker/main/src/test/java/org/onap/policy/distribution/main/startstop/TestMain.java b/artifactbroker/main/src/test/java/org/onap/policy/distribution/main/startstop/TestMain.java
new file mode 100644
index 0000000..e1c5d22
--- /dev/null
+++ b/artifactbroker/main/src/test/java/org/onap/policy/distribution/main/startstop/TestMain.java
@@ -0,0 +1,77 @@
+/*-
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2018 Ericsson. 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.distribution.main.startstop;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+import org.onap.policy.distribution.main.PolicyDistributionException;
+import org.onap.policy.distribution.main.parameters.CommonTestData;
+
+/**
+ * Class to perform unit test of Main.
+ *
+ * @author Ram Krishna Verma (ram.krishna.verma@ericsson.com)
+ */
+public class TestMain {
+
+    @Test
+    public void testMain() throws PolicyDistributionException {
+        final String[] distributionConfigParameters =
+        { "-c", "parameters/DistributionConfigParameters.json" };
+        final Main main = new Main(distributionConfigParameters);
+        assertTrue(main.getParameters().isValid());
+        assertEquals(CommonTestData.DISTRIBUTION_GROUP_NAME, main.getParameters().getName());
+        main.shutdown();
+    }
+
+    @Test
+    public void testMain_NoArguments() {
+        final String[] distributionConfigParameters =
+        {};
+        final Main main = new Main(distributionConfigParameters);
+        assertTrue(main.getParameters() == null);
+    }
+
+    @Test
+    public void testMain_InvalidArguments() {
+        final String[] distributionConfigParameters =
+        { "parameters/DistributionConfigParameters.json" };
+        final Main main = new Main(distributionConfigParameters);
+        assertTrue(main.getParameters() == null);
+    }
+
+    @Test
+    public void testMain_Help() {
+        final String[] distributionConfigParameters =
+        { "-h" };
+        Main.main(distributionConfigParameters);
+    }
+
+    @Test
+    public void testMain_InvalidParameters() {
+        final String[] distributionConfigParameters =
+        { "-c", "parameters/DistributionConfigParameters_InvalidName.json" };
+        final Main main = new Main(distributionConfigParameters);
+        assertTrue(main.getParameters() == null);
+    }
+}
diff --git a/artifactbroker/main/src/test/resources/expectedValidationResults/InvalidDecoderAndForwarderParameters.txt b/artifactbroker/main/src/test/resources/expectedValidationResults/InvalidDecoderAndForwarderParameters.txt
new file mode 100644
index 0000000..392f845
--- /dev/null
+++ b/artifactbroker/main/src/test/resources/expectedValidationResults/InvalidDecoderAndForwarderParameters.txt
@@ -0,0 +1,17 @@
+validation error(s) on parameters from "parameters/DistributionConfigParameters_InvalidDecoderAndForwarderParameters.json"
+parameter group "SDCDistributionGroup" type "org.onap.policy.distribution.main.parameters.DistributionParameterGroup" INVALID, parameter group has status INVALID
+  parameter group map "receptionHandlerParameters" INVALID, parameter group has status INVALID
+    parameter group "null_DummyReceptionHandler" type "org.onap.policy.distribution.reception.parameters.ReceptionHandlerParameters" INVALID, parameter group has status INVALID
+      parameter group "null_PluginHandler" type "org.onap.policy.distribution.reception.parameters.PluginHandlerParameters" INVALID, parameter group has status INVALID
+        parameter group map "policyDecoders" INVALID, parameter group has status INVALID
+          parameter group "" type "org.onap.policy.distribution.reception.parameters.PolicyDecoderParameters" INVALID, parameter group has status INVALID
+            field "decoderType" type "java.lang.String" value "" INVALID, must be a non-blank string
+            field "decoderClassName" type "java.lang.String" value "org.onap.policy.distribution.main.testclasses.PolicyDecoderApexPdpa" INVALID, policy decoder class not found in classpath
+          parameter group "DROOLS" type "org.onap.policy.distribution.reception.parameters.PolicyDecoderParameters" INVALID, parameter group has status INVALID
+            field "decoderClassName" type "java.lang.String" value "" INVALID, must be a non-blank string containing full class name of the decoder
+        parameter group map "policyForwarders" INVALID, parameter group has status INVALID
+          parameter group "" type "org.onap.policy.distribution.forwarding.parameters.PolicyForwarderParameters" INVALID, parameter group has status INVALID
+            field "forwarderType" type "java.lang.String" value "" INVALID, must be a non-blank string
+            field "forwarderClassName" type "java.lang.String" value "org.onap.policy.distribution.main.testclasses.PapStandalonePolicyForwarder" INVALID, policy forwarder class not found in classpath
+          parameter group "PAPEngineForwarder" type "org.onap.policy.distribution.forwarding.parameters.PolicyForwarderParameters" INVALID, parameter group has status INVALID
+            field "forwarderClassName" type "java.lang.String" value "" INVALID, must be a non-blank string containing full class name of the forwarder
\ No newline at end of file
diff --git a/artifactbroker/main/src/test/resources/expectedValidationResults/InvalidReceptionHandlerParameters.txt b/artifactbroker/main/src/test/resources/expectedValidationResults/InvalidReceptionHandlerParameters.txt
new file mode 100644
index 0000000..cec33d0
--- /dev/null
+++ b/artifactbroker/main/src/test/resources/expectedValidationResults/InvalidReceptionHandlerParameters.txt
@@ -0,0 +1,6 @@
+validation error(s) on parameters from "parameters/DistributionConfigParameters_InvalidReceptionHandlerParameters.json"
+parameter group "SDCDistributionGroup" type "org.onap.policy.distribution.main.parameters.DistributionParameterGroup" INVALID, parameter group has status INVALID
+  parameter group map "receptionHandlerParameters" INVALID, parameter group has status INVALID
+    parameter group "null_" type "org.onap.policy.distribution.reception.parameters.ReceptionHandlerParameters" INVALID, parameter group has status INVALID
+      field "receptionHandlerType" type "java.lang.String" value "" INVALID, must be a non-blank string
+      field "receptionHandlerClassName" type "java.lang.String" value "org.onap.policy.distribution.main.testclasses.InvalidSdcReceptionHandler" INVALID, reception handler class not found in classpath
diff --git a/artifactbroker/main/src/test/resources/expectedValidationResults/InvalidRestServerParameters.txt b/artifactbroker/main/src/test/resources/expectedValidationResults/InvalidRestServerParameters.txt
new file mode 100644
index 0000000..ceb195a
--- /dev/null
+++ b/artifactbroker/main/src/test/resources/expectedValidationResults/InvalidRestServerParameters.txt
@@ -0,0 +1,7 @@
+validation error(s) on parameters from "parameters/DistributionConfigParameters_InvalidRestServerParameters.json"
+parameter group "SDCDistributionGroup" type "org.onap.policy.distribution.main.parameters.DistributionParameterGroup" INVALID, parameter group has status INVALID
+  parameter group "null" type "org.onap.policy.distribution.main.parameters.RestServerParameters" INVALID, parameter group has status INVALID
+    field "host" type "java.lang.String" value "" INVALID, must be a non-blank string containing hostname/ipaddress of the distribution rest server
+    field "port" type "int" value "-1" INVALID, must be a positive integer containing port of the distribution rest server
+    field "userName" type "java.lang.String" value "" INVALID, must be a non-blank string containing userName for distribution rest server credentials
+    field "password" type "java.lang.String" value "" INVALID, must be a non-blank string containing password for distribution rest server credentials
diff --git a/artifactbroker/main/src/test/resources/parameters/DistributionConfigParameters_EmptyArtifactForwarder.json b/artifactbroker/main/src/test/resources/parameters/DistributionConfigParameters_EmptyArtifactForwarder.json
new file mode 100644
index 0000000..4318c1e
--- /dev/null
+++ b/artifactbroker/main/src/test/resources/parameters/DistributionConfigParameters_EmptyArtifactForwarder.json
@@ -0,0 +1,43 @@
+{
+    "name":"SDCDistributionGroup",
+    "restServerParameters":{
+        "host":"0.0.0.0",
+        "port":6969,
+        "userName":"healthcheck",
+        "password":"zb!XztG34"
+    },
+    "receptionHandlerParameters":{
+        "DummyReceptionHandler":{
+            "receptionHandlerType":"DummyReceptionHandler",
+            "receptionHandlerClassName":"org.onap.policy.distribution.main.testclasses.DummyReceptionHandler",
+            "receptionHandlerConfigurationName":"dummyReceptionHandlerConfiguration",
+            "pluginHandlerParameters":{
+                "artifactForwarders":{
+                }
+            }
+        }
+    },
+    "receptionHandlerConfigurationParameters":{
+        "dummyReceptionHandlerConfiguration":{
+            "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyReceptionHandlerParameterGroup",
+            "parameters":{
+                "myStringParameter": "stringValue",
+                "myIntegerParameter":20,
+                "myBooleanParameter": true
+            }
+        }
+    },
+    "artifactForwarderConfigurationParameters":{
+        "dummyConfiguration":{
+            "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyArtifactForwarderParameterGroup",
+            "parameters":{
+                "useHttps": false,
+                "hostname": "192.168.99.100",
+                "port": 8081,
+                "userName": "user",
+                "password": "pw123",
+                "isManaged": true
+            }
+        }
+    }
+}
diff --git a/artifactbroker/main/src/test/resources/parameters/DistributionConfigParameters_EmptyReceptionHandler.json b/artifactbroker/main/src/test/resources/parameters/DistributionConfigParameters_EmptyReceptionHandler.json
index c1535e0..39a04d8 100644
--- a/artifactbroker/main/src/test/resources/parameters/DistributionConfigParameters_EmptyReceptionHandler.json
+++ b/artifactbroker/main/src/test/resources/parameters/DistributionConfigParameters_EmptyReceptionHandler.json
@@ -18,9 +18,9 @@
             }
         }
     },
-    "policyForwarderConfigurationParameters":{
+    "artifactForwarderConfigurationParameters":{
         "dummyConfiguration":{
-            "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyForwarderParameterGroup",
+            "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyArtifactForwarderParameterGroup",
             "parameters":{
                 "useHttps": false,
                 "hostname": "192.168.99.100",
diff --git a/artifactbroker/main/src/test/resources/parameters/DistributionConfigParameters_EmptyReceptionHandlerClass.json b/artifactbroker/main/src/test/resources/parameters/DistributionConfigParameters_EmptyReceptionHandlerClass.json
new file mode 100644
index 0000000..099de71
--- /dev/null
+++ b/artifactbroker/main/src/test/resources/parameters/DistributionConfigParameters_EmptyReceptionHandlerClass.json
@@ -0,0 +1,48 @@
+{
+    "name":"SDCDistributionGroup",
+    "restServerParameters":{
+        "host":"0.0.0.0",
+        "port":6969,
+        "userName":"healthcheck",
+        "password":"zb!XztG34"
+    },
+    "receptionHandlerParameters":{
+        "DummyReceptionHandler":{
+            "receptionHandlerType":"",
+            "receptionHandlerClassName":"org.onap.policy.distribution.main.testclasses.InvalidSdcReceptionHandler",
+            "receptionHandlerConfigurationName":"dummyReceptionHandlerConfiguration",
+            "pluginHandlerParameters":{
+                "artifactForwarders":{
+                    "DummyForwarder":{
+                        "forwarderType":"DummyForwarder",
+                        "forwarderClassName":"org.onap.policy.distribution.main.testclasses.DummyArtifactForwarder",
+                        "forwarderConfigurationName": "dummyConfiguration"
+                    }
+                }
+            }
+        }
+    },
+    "receptionHandlerConfigurationParameters":{
+        "dummyReceptionHandlerConfiguration":{
+            "parameterClassName":"",
+            "parameters":{
+                "myStringParameter": "stringValue",
+                "myIntegerParameter":20,
+                "myBooleanParameter": true
+            }
+        }
+    },
+    "artifactForwarderConfigurationParameters":{
+        "dummyConfiguration":{
+            "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyArtifactForwarderParameterGroup",
+            "parameters":{
+                "useHttps": false,
+                "hostname": "192.168.99.100",
+                "port": 8081,
+                "userName": "user",
+                "password": "pw123",
+                "isManaged": true
+            }
+        }
+    }
+}
diff --git a/artifactbroker/main/src/test/resources/parameters/DistributionConfigParameters_InvalidForwarderConfigurationClassName.json b/artifactbroker/main/src/test/resources/parameters/DistributionConfigParameters_InvalidForwarderConfigurationClassName.json
new file mode 100644
index 0000000..b70fdaa
--- /dev/null
+++ b/artifactbroker/main/src/test/resources/parameters/DistributionConfigParameters_InvalidForwarderConfigurationClassName.json
@@ -0,0 +1,48 @@
+{
+    "name":"SDCDistributionGroup",
+    "restServerParameters":{
+        "host":"0.0.0.0",
+        "port":6969,
+        "userName":"healthcheck",
+        "password":"zb!XztG34"
+    },
+    "receptionHandlerParameters":{
+        "DummyReceptionHandler":{
+            "receptionHandlerType":"DummyReceptionHandler",
+            "receptionHandlerClassName":"org.onap.policy.distribution.main.testclasses.DummyReceptionHandler",
+            "receptionHandlerConfigurationName":"dummyReceptionHandlerConfiguration",
+            "pluginHandlerParameters":{
+                "artifactForwarders":{
+                    "DummyForwarder":{
+                        "forwarderType":"DummyForwarder",
+                        "forwarderClassName":"org.onap.policy.distribution.main.testclasses.DummyArtifactForwarder",
+                        "forwarderConfigurationParameters": "dummyConfiguration"
+                    }
+                }
+            }
+        }
+    },
+    "receptionHandlerConfigurationParameters":{
+        "dummyReceptionHandlerConfiguration":{
+            "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyReceptionHandlerParameterGroup",
+            "parameters":{
+                "myStringParameter": "stringValue",
+                "myIntegerParameter":20,
+                "myBooleanParameter": true
+            }
+        }
+    },
+    "artifactForwarderConfigurationParameters":{
+        "dummyConfiguration":{
+            "parameterClassName":"",
+            "parameters":{
+                "useHttps": false,
+                "hostname": "192.168.99.100",
+                "port": 8081,
+                "userName": "user",
+                "password": "pw123",
+                "isManaged": true
+            }
+        }
+    }
+}
diff --git a/artifactbroker/main/src/test/resources/parameters/DistributionConfigParameters_InvalidName.json b/artifactbroker/main/src/test/resources/parameters/DistributionConfigParameters_InvalidName.json
new file mode 100644
index 0000000..6bbecad
--- /dev/null
+++ b/artifactbroker/main/src/test/resources/parameters/DistributionConfigParameters_InvalidName.json
@@ -0,0 +1,48 @@
+{
+    "name":" ",
+    "restServerParameters":{
+        "host":"0.0.0.0",
+        "port":6969,
+        "userName":"healthcheck",
+        "password":"zb!XztG34"
+    },
+    "receptionHandlerParameters":{
+        "DummyReceptionHandler":{
+            "receptionHandlerType":"DummyReceptionHandler",
+            "receptionHandlerClassName":"org.onap.policy.distribution.main.testclasses.DummyReceptionHandler",
+            "receptionHandlerConfigurationName":"dummyReceptionHandlerConfiguration",
+            "pluginHandlerParameters":{
+                "artifactForwarders":{
+                    "DummyForwarder":{
+                        "forwarderType":"DummyForwarder",
+                        "forwarderClassName":"org.onap.policy.distribution.main.testclasses.DummyArtifactForwarder",
+                        "forwarderConfigurationName": "dummyConfiguration"
+                    }
+                }
+            }
+        }
+    },
+    "receptionHandlerConfigurationParameters":{
+        "dummyReceptionHandlerConfiguration":{
+            "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyReceptionHandlerParameterGroup",
+            "parameters":{
+                "myStringParameter": "stringValue",
+                "myIntegerParameter":20,
+                "myBooleanParameter": true
+            }
+        }
+    },
+    "artifactForwarderConfigurationParameters":{
+        "dummyConfiguration":{
+            "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyArtifactForwarderParameterGroup",
+            "parameters":{
+                "useHttps": false,
+                "hostname": "192.168.99.100",
+                "port": 8081,
+                "userName": "user",
+                "password": "pw123",
+                "isManaged": true
+            }
+        }
+    }
+}
diff --git a/artifactbroker/main/src/test/resources/parameters/DistributionConfigParameters_InvalidReceptionHandlerClass.json b/artifactbroker/main/src/test/resources/parameters/DistributionConfigParameters_InvalidReceptionHandlerClass.json
new file mode 100644
index 0000000..2def59a
--- /dev/null
+++ b/artifactbroker/main/src/test/resources/parameters/DistributionConfigParameters_InvalidReceptionHandlerClass.json
@@ -0,0 +1,48 @@
+{
+    "name":"SDCDistributionGroup",
+    "restServerParameters":{
+        "host":"0.0.0.0",
+        "port":6969,
+        "userName":"healthcheck",
+        "password":"zb!XztG34"
+    },
+    "receptionHandlerParameters":{
+        "DummyReceptionHandler":{
+            "receptionHandlerType":"",
+            "receptionHandlerClassName":"org.onap.policy.distribution.main.testclasses.InvalidSdcReceptionHandler",
+            "receptionHandlerConfigurationName":"dummyReceptionHandlerConfiguration",
+            "pluginHandlerParameters":{
+                "artifactForwarders":{
+                    "DummyForwarder":{
+                        "forwarderType":"DummyForwarder",
+                        "forwarderClassName":"org.onap.policy.distribution.main.testclasses.DummyArtifactForwarder",
+                        "forwarderConfigurationName": "dummyConfiguration"
+                    }
+                }
+            }
+        }
+    },
+    "receptionHandlerConfigurationParameters":{
+        "dummyReceptionHandlerConfiguration":{
+            "parameterClassName":"org.onap.policy.distribution.main.testclasses.InvalidReceptionHandlerParameterGroup",
+            "parameters":{
+                "myStringParameter": "stringValue",
+                "myIntegerParameter":20,
+                "myBooleanParameter": true
+            }
+        }
+    },
+    "artifactForwarderConfigurationParameters":{
+        "dummyConfiguration":{
+            "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyArtifactForwarderParameterGroup",
+            "parameters":{
+                "useHttps": false,
+                "hostname": "192.168.99.100",
+                "port": 8081,
+                "userName": "user",
+                "password": "pw123",
+                "isManaged": true
+            }
+        }
+    }
+}
diff --git a/artifactbroker/main/src/test/resources/parameters/DistributionConfigParameters_InvalidReceptionHandlerParameters.json b/artifactbroker/main/src/test/resources/parameters/DistributionConfigParameters_InvalidReceptionHandlerParameters.json
new file mode 100644
index 0000000..d3ad8b2
--- /dev/null
+++ b/artifactbroker/main/src/test/resources/parameters/DistributionConfigParameters_InvalidReceptionHandlerParameters.json
@@ -0,0 +1,48 @@
+{
+    "name":"SDCDistributionGroup",
+    "restServerParameters":{
+        "host":"0.0.0.0",
+        "port":6969,
+        "userName":"healthcheck",
+        "password":"zb!XztG34"
+    },
+    "receptionHandlerParameters":{
+        "DummyReceptionHandler":{
+            "receptionHandlerType":"",
+            "receptionHandlerClassName":"org.onap.policy.distribution.main.testclasses.InvalidSdcReceptionHandler",
+            "receptionHandlerConfigurationName":"dummyReceptionHandlerConfiguration",
+            "pluginHandlerParameters":{
+                "artifactForwarders":{
+                    "DummyForwarder":{
+                        "forwarderType":"DummyForwarder",
+                        "forwarderClassName":"org.onap.policy.distribution.main.testclasses.DummyArtifactForwarder",
+                        "forwarderConfigurationName": "dummyConfiguration"
+                    }
+                }
+            }
+        }
+    },
+    "receptionHandlerConfigurationParameters":{
+        "dummyReceptionHandlerConfiguration":{
+            "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyReceptionHandlerParameterGroup",
+            "parameters":{
+                "myStringParameter": "stringValue",
+                "myIntegerParameter":20,
+                "myBooleanParameter": true
+            }
+        }
+    },
+    "artifactForwarderConfigurationParameters":{
+        "dummyConfiguration":{
+            "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyArtifactForwarderParameterGroup",
+            "parameters":{
+                "useHttps": false,
+                "hostname": "192.168.99.100",
+                "port": 8081,
+                "userName": "user",
+                "password": "pw123",
+                "isManaged": true
+            }
+        }
+    }
+}
diff --git a/artifactbroker/main/src/test/resources/parameters/DistributionConfigParameters_InvalidRestServerParameters.json b/artifactbroker/main/src/test/resources/parameters/DistributionConfigParameters_InvalidRestServerParameters.json
new file mode 100644
index 0000000..a37ca47
--- /dev/null
+++ b/artifactbroker/main/src/test/resources/parameters/DistributionConfigParameters_InvalidRestServerParameters.json
@@ -0,0 +1,48 @@
+{
+    "name":"SDCDistributionGroup",
+    "restServerParameters":{
+        "host":"",
+        "port":-1,
+        "userName":"",
+        "password":""
+    },
+    "receptionHandlerParameters":{
+        "DummyReceptionHandler":{
+            "receptionHandlerType":"DummyReceptionHandler",
+            "receptionHandlerClassName":"org.onap.policy.distribution.main.testclasses.DummyReceptionHandler",
+            "receptionHandlerConfigurationName":"dummyReceptionHandlerConfiguration",
+            "pluginHandlerParameters":{
+                "artifactForwarders":{
+                    "DummyForwarder":{
+                        "forwarderType":"DummyForwarder",
+                        "forwarderClassName":"org.onap.policy.distribution.main.testclasses.DummyArtifactForwarder",
+                        "forwarderConfigurationName": "dummyConfiguration"
+                    }
+                }
+            }
+        }
+    },
+    "receptionHandlerConfigurationParameters":{
+        "dummyReceptionHandlerConfiguration":{
+            "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyReceptionHandlerParameterGroup",
+            "parameters":{
+                "myStringParameter": "stringValue",
+                "myIntegerParameter":20,
+                "myBooleanParameter": true
+            }
+        }
+    },
+    "artifactForwarderConfigurationParameters":{
+        "dummyConfiguration":{
+            "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyArtifactForwarderParameterGroup",
+            "parameters":{
+                "useHttps": false,
+                "hostname": "192.168.99.100",
+                "port": 8081,
+                "userName": "user",
+                "password": "pw123",
+                "isManaged": true
+            }
+        }
+    }
+}
diff --git a/artifactbroker/main/src/test/resources/parameters/DistributionConfigParameters_NoPolicyForwarder.json b/artifactbroker/main/src/test/resources/parameters/DistributionConfigParameters_NoArtifactForwarder.json
similarity index 100%
rename from artifactbroker/main/src/test/resources/parameters/DistributionConfigParameters_NoPolicyForwarder.json
rename to artifactbroker/main/src/test/resources/parameters/DistributionConfigParameters_NoArtifactForwarder.json
diff --git a/artifactbroker/main/src/test/resources/parameters/DistributionConfigParameters_UnknownForwarderConfigurationClassName.json b/artifactbroker/main/src/test/resources/parameters/DistributionConfigParameters_UnknownForwarderConfigurationClassName.json
new file mode 100644
index 0000000..2bde3c0
--- /dev/null
+++ b/artifactbroker/main/src/test/resources/parameters/DistributionConfigParameters_UnknownForwarderConfigurationClassName.json
@@ -0,0 +1,48 @@
+{
+    "name":"SDCDistributionGroup",
+    "restServerParameters":{
+        "host":"0.0.0.0",
+        "port":6969,
+        "userName":"healthcheck",
+        "password":"zb!XztG34"
+    },
+    "receptionHandlerParameters":{
+        "DummyReceptionHandler":{
+            "receptionHandlerType":"DummyReceptionHandler",
+            "receptionHandlerClassName":"org.onap.policy.distribution.main.testclasses.DummyReceptionHandler",
+            "receptionHandlerConfigurationName":"dummyReceptionHandlerConfiguration",
+            "pluginHandlerParameters":{
+                "artifactForwarders":{
+                    "DummyForwarder":{
+                        "forwarderType":"DummyForwarder",
+                        "forwarderClassName":"org.onap.policy.distribution.main.testclasses.DummyArtifactForwarder",
+                        "forwarderConfigurationParameters": "dummyConfiguration"
+                    }
+                }
+            }
+        }
+    },
+    "receptionHandlerConfigurationParameters":{
+        "dummyReceptionHandlerConfiguration":{
+            "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyReceptionHandlerParameterGroup",
+            "parameters":{
+                "myStringParameter": "stringValue",
+                "myIntegerParameter":20,
+                "myBooleanParameter": true
+            }
+        }
+    },
+    "artifactForwarderConfigurationParameters":{
+        "dummyConfiguration":{
+            "parameterClassName":"org.onap.policy.Unknown",
+            "parameters":{
+                "useHttps": false,
+                "hostname": "192.168.99.100",
+                "port": 8081,
+                "userName": "user",
+                "password": "pw123",
+                "isManaged": true
+            }
+        }
+    }
+}
diff --git a/artifactbroker/packages/pom.xml b/artifactbroker/packages/pom.xml
index c371cad..63769f4 100644
--- a/artifactbroker/packages/pom.xml
+++ b/artifactbroker/packages/pom.xml
@@ -52,6 +52,11 @@
             <artifactId>multicloud-framework-artifactbroker-reception-plugins</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.onap.multicloud.framework</groupId>
+            <artifactId>multicloud-framework-artifactbroker-forwarding-plugins</artifactId>
+            <version>${project.version}</version>
+        </dependency>
     </dependencies>
 
     <build>
diff --git a/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/FileSystemReceptionHandler.java b/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/FileSystemReceptionHandler.java
deleted file mode 100644
index 941cdd6..0000000
--- a/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/FileSystemReceptionHandler.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2018 Intel Corp. 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.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.distribution.reception.handling.sdc;
-
-import static java.nio.file.StandardWatchEventKinds.ENTRY_CREATE;
-
-import java.io.File;
-import java.io.IOException;
-import java.nio.file.FileSystems;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.nio.file.WatchEvent;
-import java.nio.file.WatchKey;
-import java.nio.file.WatchService;
-
-import org.onap.policy.common.logging.flexlogger.FlexLogger;
-import org.onap.policy.common.logging.flexlogger.Logger;
-
-import org.onap.policy.common.parameters.ParameterService;
-import org.onap.policy.distribution.model.Csar;
-import org.onap.policy.distribution.reception.decoding.PolicyDecodingException;
-import org.onap.policy.distribution.reception.handling.AbstractReceptionHandler;
-
-/**
- * Handles reception of inputs from File System which can be used to decode policies.
- */
-public class FileSystemReceptionHandler extends AbstractReceptionHandler {
-    private boolean running = false;
-    private static final Logger LOGGER = FlexLogger.getLogger(FileSystemReceptionHandler.class);
-
-    @Override
-    protected void initializeReception(final String parameterGroupName) {
-        LOGGER.debug("FileSystemReceptionHandler init...");
-        try {
-            final FileSystemReceptionHandlerConfigurationParameterGroup handlerParameters =
-                                    ParameterService.get(parameterGroupName);
-            main(handlerParameters.getWatchPath());
-        } catch (final Exception ex) {
-            LOGGER.error(ex);
-        }
-        running = false;
-        LOGGER.debug("FileSystemReceptionHandler main loop exited...");
-    }
-
-    @Override
-    public void destroy() {
-        // Tear down subscription etc
-        running = false;
-    }
-
-    public boolean isRunning() {
-        return running;
-    }
-
-    /**
-     * Main entry point.
-     * 
-     * @param watchPath Path to watch
-     */
-    public void main(String watchPath) throws IOException {
-        try (final WatchService watcher = FileSystems.getDefault().newWatchService()) {
-            final Path dir = Paths.get(watchPath);
-            dir.register(watcher, ENTRY_CREATE);
-            LOGGER.debug("Watch Service registered for dir: " + dir.getFileName());
-            startMainLoop(watcher, dir);
-        } catch (final InterruptedException ex) {
-            LOGGER.debug(ex);
-            Thread.currentThread().interrupt();
-        }
-    }
-
-    @SuppressWarnings("unchecked")
-    protected void startMainLoop(WatchService watcher, Path dir) throws InterruptedException {
-        WatchKey key;
-        running = true;
-        while (running) {
-            key = watcher.take();
-
-            for (final WatchEvent<?> event : key.pollEvents()) {
-                final WatchEvent<Path> ev = (WatchEvent<Path>) event;
-                final Path fileName = ev.context();
-                LOGGER.debug("new CSAR found: " + fileName);
-                createPolicyInputAndCallHandler(dir.toString() + File.separator + fileName.toString());
-                LOGGER.debug("CSAR complete: " + fileName);
-            }
-            final boolean valid = key.reset();
-            if (!valid) {
-                LOGGER.error("Watch key no longer valid!");
-                break;
-            }
-        }
-    }
-
-    protected void createPolicyInputAndCallHandler(final String fileName) {
-        try {
-            final Csar csarObject = new Csar(fileName);
-            inputReceived(csarObject);
-        } catch (final PolicyDecodingException ex) {
-            LOGGER.error(ex);
-        }
-    }
-}
diff --git a/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/FileSystemReceptionHandlerConfigurationParameterBuilder.java b/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/FileSystemReceptionHandlerConfigurationParameterBuilder.java
deleted file mode 100644
index 37a1698..0000000
--- a/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/FileSystemReceptionHandlerConfigurationParameterBuilder.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2018 Intel Corp. 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.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.distribution.reception.handling.sdc;
-
-/**
- * This class builds an instance of {@link FileSystemReceptionHandlerConfigurationParameterGroup} class.
- *
- */
-public class FileSystemReceptionHandlerConfigurationParameterBuilder {
-
-    private String watchPath;
-
-    /**
-     * Set watchPath to this {@link FileSystemReceptionHandlerConfigurationParameterBuilder} instance.
-     *
-     * @param watchPath the watchPath
-     */
-    public FileSystemReceptionHandlerConfigurationParameterBuilder setWatchPath(final String watchPath) {
-        this.watchPath = watchPath;
-        return this;
-    }
-
-
-    /**
-     * Returns the watchPath of this {@link FileSystemReceptionHandlerConfigurationParameterBuilder} instance.
-     *
-     * @return the watchPath
-     */
-    public String getWatchPath() {
-        return watchPath;
-    }
-}
-
-
diff --git a/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/FileSystemReceptionHandlerConfigurationParameterGroup.java b/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/FileSystemReceptionHandlerConfigurationParameterGroup.java
deleted file mode 100644
index 457cd5e..0000000
--- a/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/FileSystemReceptionHandlerConfigurationParameterGroup.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2018 Intel. 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.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.distribution.reception.handling.sdc;
-
-import java.io.File;
-
-import org.onap.policy.common.parameters.GroupValidationResult;
-import org.onap.policy.common.parameters.ValidationStatus;
-import org.onap.policy.distribution.reception.parameters.ReceptionHandlerConfigurationParameterGroup;
-
-/**
- * This class handles reading, parsing and validating of the Policy SDC Service Distribution parameters from Json
- * format, which strictly adheres to the interface:IConfiguration, defined by SDC SDK.
- */
-public class FileSystemReceptionHandlerConfigurationParameterGroup extends ReceptionHandlerConfigurationParameterGroup {
-
-    private String watchPath;
-
-    /**
-     * The constructor for instantiating {@link FileSystemReceptionHandlerConfigurationParameterGroup} class.
-     *
-     * @param builder the SDC configuration builder
-     */
-    public FileSystemReceptionHandlerConfigurationParameterGroup(
-            final FileSystemReceptionHandlerConfigurationParameterBuilder builder) {
-        watchPath = builder.getWatchPath();
-    }
-
-    public String getWatchPath() {
-        return watchPath;
-    }
-
-    /**
-     * {@inheritDoc}.
-     */
-    @Override
-    public GroupValidationResult validate() {
-        final GroupValidationResult validationResult = new GroupValidationResult(this);
-        validatePathElement(validationResult, watchPath, "watchPath");
-        return validationResult;
-    }
-
-
-    /**
-     * Validate the string element.
-     *
-     * @param validationResult the result object
-     * @param element the element to validate
-     * @param elementName the element name for error message
-     */
-    private void validatePathElement(final GroupValidationResult validationResult, final String element,
-            final String elementName) {
-        boolean valid = false;
-        if (element != null) {
-            File file = new File(element);
-            if (file.exists() && file.isDirectory()) {
-                valid = true;
-            }
-        }
-        if (!valid) {
-            validationResult.setResult(elementName, ValidationStatus.INVALID,
-                    elementName + " must be a valid directory");
-        }
-    }
-}
-
