summaryrefslogtreecommitdiffstats
path: root/artifactbroker/plugins/reception-plugins/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'artifactbroker/plugins/reception-plugins/src/test/java')
-rw-r--r--artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/DummyArtifactForwarder.java72
-rw-r--r--artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/DummyPolicy.java62
-rw-r--r--artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestComponentDoneStatusMessage.java61
-rw-r--r--artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestDistributionStatusMessage.java65
-rw-r--r--artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestSdcReceptionHandlerConfigurationParameterGroup.java160
-rw-r--r--artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/exceptions/ArtifactDownloadExceptionTest.java36
-rw-r--r--artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/exceptions/ArtifactInstallerExceptionTest.java36
-rw-r--r--artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/exceptions/PssdControllerExceptionTest.java36
-rw-r--r--artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/exceptions/PssdParametersExceptionTest.java36
9 files changed, 564 insertions, 0 deletions
diff --git a/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/DummyArtifactForwarder.java b/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/DummyArtifactForwarder.java
new file mode 100644
index 0000000..445d47c
--- /dev/null
+++ b/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/DummyArtifactForwarder.java
@@ -0,0 +1,72 @@
+/*-
+ * ============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.reception.handling.sdc;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.onap.policy.distribution.forwarding.ArtifactForwarder;
+import org.onap.policy.distribution.forwarding.ArtifactForwardingException;
+import org.onap.sdc.api.notification.IArtifactInfo;
+
+/**
+ * Class to create a dummy forwarder for test cases.
+ *
+ * @author Ram Krishna Verma (ram.krishna.verma@ericsson.com)
+ */
+public class DummyArtifactForwarder implements ArtifactForwarder {
+ private int numberOfPoliciesReceived = 0;
+ private Collection<IArtifactInfo> policiesReceived = new ArrayList<>();
+
+ /**
+ * {@inheritDoc}.
+ */
+ @Override
+ public void forward(final Collection<IArtifactInfo> policies) throws ArtifactForwardingException {
+ numberOfPoliciesReceived += policies.size();
+ policiesReceived.addAll(policies);
+ }
+
+ /**
+ * Returns the number of policies received by this forwarder.
+ *
+ * @return the integer value
+ */
+ public int getNumberOfPoliciesReceived() {
+ return numberOfPoliciesReceived;
+ }
+
+ /**
+ * Checks if the forwarder has received a policy with given policy type.
+ *
+ * @param policyType the policy type
+ * @return the boolean result
+ */
+ public boolean receivedPolicyWithGivenType(final String policyType) {
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}.
+ */
+ @Override
+ public void configure(final String parameterGroupName) {}
+}
diff --git a/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/DummyPolicy.java b/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/DummyPolicy.java
new file mode 100644
index 0000000..f4c56ab
--- /dev/null
+++ b/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/DummyPolicy.java
@@ -0,0 +1,62 @@
+/*-
+ * ============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.reception.handling.sdc;
+
+import org.onap.policy.distribution.model.Policy;
+
+/**
+ * Class to create a dummy policy for test cases.
+ *
+ * @author Ram Krishna Verma (ram.krishna.verma@ericsson.com)
+ */
+public class DummyPolicy implements Policy {
+
+ private String policyName;
+ private String policyType;
+
+ /**
+ * Constructor for instantiating {@link DummyPolicy} class.
+ *
+ * @param policyName the policy name
+ * @param policyType the policy type
+ */
+ public DummyPolicy(final String policyName, final String policyType) {
+ super();
+ this.policyName = policyName;
+ this.policyType = policyType;
+ }
+
+ /**
+ * {@inheritDoc}.
+ */
+ @Override
+ public String getPolicyName() {
+ return policyName;
+ }
+
+ /**
+ * {@inheritDoc}.
+ */
+ @Override
+ public String getPolicyType() {
+ return policyType;
+ }
+}
diff --git a/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestComponentDoneStatusMessage.java b/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestComponentDoneStatusMessage.java
new file mode 100644
index 0000000..75e3224
--- /dev/null
+++ b/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestComponentDoneStatusMessage.java
@@ -0,0 +1,61 @@
+/*-
+ * ============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 static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.onap.sdc.utils.DistributionStatusEnum;
+
+public class TestComponentDoneStatusMessage {
+
+ @Test
+ public void testComponentDoneStatusMessage_Success() {
+ final String consumerId = "dummyId";
+ final String distributionId = "dummyDistribution";
+ final long timestamp = System.currentTimeMillis();
+ final ComponentDoneStatusMessageBuilder messageBuilder =
+ new ComponentDoneStatusMessageBuilder().setConsumerId(consumerId).setDistributionId(distributionId)
+ .setDistributionStatus(DistributionStatusEnum.COMPONENT_DONE_OK).setTimestamp(timestamp);
+ final ComponentDoneStatusMessage message = new ComponentDoneStatusMessage(messageBuilder);
+ assertEquals("POLICY", message.getComponentName());
+ assertEquals(consumerId, message.getConsumerID());
+ assertEquals(distributionId, message.getDistributionID());
+ assertEquals(DistributionStatusEnum.COMPONENT_DONE_OK, message.getStatus());
+ assertEquals(timestamp, message.getTimestamp());
+ }
+
+ @Test
+ public void testComponentDoneStatusMessage_Failure() {
+ final String consumerId = "dummyId";
+ final String distributionId = "dummyDistribution";
+ final long timestamp = System.currentTimeMillis();
+ final ComponentDoneStatusMessageBuilder messageBuilder =
+ new ComponentDoneStatusMessageBuilder().setConsumerId(consumerId).setDistributionId(distributionId)
+ .setDistributionStatus(DistributionStatusEnum.COMPONENT_DONE_ERROR).setTimestamp(timestamp);
+ final ComponentDoneStatusMessage message = new ComponentDoneStatusMessage(messageBuilder);
+ assertEquals("POLICY", message.getComponentName());
+ assertEquals(consumerId, message.getConsumerID());
+ assertEquals(distributionId, message.getDistributionID());
+ assertEquals(DistributionStatusEnum.COMPONENT_DONE_ERROR, message.getStatus());
+ assertEquals(timestamp, message.getTimestamp());
+ }
+}
diff --git a/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestDistributionStatusMessage.java b/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestDistributionStatusMessage.java
new file mode 100644
index 0000000..be12777
--- /dev/null
+++ b/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestDistributionStatusMessage.java
@@ -0,0 +1,65 @@
+/*-
+ * ============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 static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.onap.sdc.utils.DistributionStatusEnum;
+
+public class TestDistributionStatusMessage {
+
+ @Test
+ public void testDistributionStatusMessage_Download() {
+ final String artifactUrl = "http://dummyurl";
+ final String consumerId = "dummyId";
+ final String distributionId = "dummyDistribution";
+ final long timestamp = System.currentTimeMillis();
+
+ final DistributionStatusMessageBuilder messageBuilder = new DistributionStatusMessageBuilder()
+ .setArtifactUrl(artifactUrl).setConsumerId(consumerId).setDistributionId(distributionId)
+ .setDistributionStatus(DistributionStatusEnum.DOWNLOAD_OK).setTimestamp(timestamp);
+ final DistributionStatusMessage message = new DistributionStatusMessage(messageBuilder);
+ assertEquals(artifactUrl, message.getArtifactURL());
+ assertEquals(consumerId, message.getConsumerID());
+ assertEquals(distributionId, message.getDistributionID());
+ assertEquals(DistributionStatusEnum.DOWNLOAD_OK, message.getStatus());
+ assertEquals(timestamp, message.getTimestamp());
+ }
+
+ @Test
+ public void testDistributionStatusMessage_Deploy() {
+ final String artifactUrl = "http://dummyurl";
+ final String consumerId = "dummyId";
+ final String distributionId = "dummyDistribution";
+ final long timestamp = System.currentTimeMillis();
+
+ final DistributionStatusMessageBuilder messageBuilder = new DistributionStatusMessageBuilder()
+ .setArtifactUrl(artifactUrl).setConsumerId(consumerId).setDistributionId(distributionId)
+ .setDistributionStatus(DistributionStatusEnum.DEPLOY_OK).setTimestamp(timestamp);
+ final DistributionStatusMessage message = new DistributionStatusMessage(messageBuilder);
+ assertEquals(artifactUrl, message.getArtifactURL());
+ assertEquals(consumerId, message.getConsumerID());
+ assertEquals(distributionId, message.getDistributionID());
+ assertEquals(DistributionStatusEnum.DEPLOY_OK, message.getStatus());
+ assertEquals(timestamp, message.getTimestamp());
+ }
+}
diff --git a/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestSdcReceptionHandlerConfigurationParameterGroup.java b/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestSdcReceptionHandlerConfigurationParameterGroup.java
new file mode 100644
index 0000000..f9a65c5
--- /dev/null
+++ b/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestSdcReceptionHandlerConfigurationParameterGroup.java
@@ -0,0 +1,160 @@
+/*-
+ * ============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 static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.Arrays;
+
+import org.junit.Test;
+import org.onap.policy.common.parameters.GroupValidationResult;
+
+/**
+ * Class to perform unit test of {@link SdcConfiguration}.
+ *
+ */
+public class TestSdcReceptionHandlerConfigurationParameterGroup {
+
+ @Test
+ public void testSdcConfiguration() throws IOException {
+ SdcReceptionHandlerConfigurationParameterGroup configParameters = null;
+ try {
+ final Gson gson = new GsonBuilder().create();
+ configParameters = gson.fromJson(new FileReader("src/test/resources/handling-sdc.json"),
+ SdcReceptionHandlerConfigurationParameterGroup.class);
+ } catch (final Exception e) {
+ fail("test should not thrown an exception here: " + e.getMessage());
+ }
+ final GroupValidationResult validationResult = configParameters.validate();
+ assertTrue(validationResult.isValid());
+ final SdcConfiguration config = new SdcConfiguration(configParameters);
+ assertEquals(Arrays.asList("a.com", "b.com", "c.com"), config.getMsgBusAddress());
+ assertEquals(Arrays.asList("TOSCA_CSAR", "HEAT"), config.getRelevantArtifactTypes());
+ assertEquals("localhost", config.getAsdcAddress());
+ assertEquals("policy", config.getUser());
+ assertEquals("policy", config.getPassword());
+ assertEquals(20, config.getPollingInterval());
+ assertEquals(30, config.getPollingTimeout());
+ assertEquals("policy-id", config.getConsumerID());
+ assertEquals("policy-group", config.getConsumerGroup());
+ assertEquals("TEST", config.getEnvironmentName());
+ assertEquals("null", config.getKeyStorePath());
+ assertEquals("null", config.getKeyStorePassword());
+ assertEquals(false, config.activateServerTLSAuth());
+ assertEquals(true, config.isFilterInEmptyResources());
+ assertEquals(false, config.isUseHttpsWithDmaap());
+ }
+
+ @Test
+ public void testInvalidSdcConfiguration() throws IOException {
+ SdcReceptionHandlerConfigurationParameterGroup configParameters = null;
+ try {
+ final Gson gson = new GsonBuilder().create();
+ configParameters = gson.fromJson(new FileReader("src/test/resources/handling-sdcInvalid.json"),
+ SdcReceptionHandlerConfigurationParameterGroup.class);
+ } catch (final Exception e) {
+ fail("test should not thrown an exception here: " + e.getMessage());
+ }
+ final GroupValidationResult validationResult = configParameters.validate();
+ assertFalse(validationResult.isValid());
+ }
+
+ @Test
+ public void testSdcConfigurationBuilder() {
+
+ final SdcReceptionHandlerConfigurationParameterBuilder builder =
+ new SdcReceptionHandlerConfigurationParameterBuilder().setAsdcAddress("localhost")
+ .setConsumerGroup("policy-group").setConsumerId("policy-id").setEnvironmentName("TEST")
+ .setKeystorePassword("password").setKeystorePath("dummyPath").setPassword("policy")
+ .setPollingInterval(10).setPollingTimeout(20).setRetryDelay(30).setUser("policy")
+ .setUseHttpsWithDmaap(false).setActiveserverTlsAuth(false).setFilterinEmptyResources(true)
+ .setArtifactTypes(Arrays.asList("TOSCA_CSAR")).setMessageBusAddress(Arrays.asList("localhost"));
+ final SdcReceptionHandlerConfigurationParameterGroup configParameters =
+ new SdcReceptionHandlerConfigurationParameterGroup(builder);
+ configParameters.setName("SDCConfiguration");
+
+ assertEquals(Arrays.asList("localhost"), configParameters.getMessageBusAddress());
+ assertEquals(Arrays.asList("TOSCA_CSAR"), configParameters.getArtifactTypes());
+ assertEquals("localhost", configParameters.getAsdcAddress());
+ assertEquals("policy", configParameters.getUser());
+ assertEquals("policy", configParameters.getPassword());
+ assertEquals(10, configParameters.getPollingInterval());
+ assertEquals(20, configParameters.getPollingTimeout());
+ assertEquals(30, configParameters.getRetryDelay());
+ assertEquals("policy-id", configParameters.getConsumerId());
+ assertEquals("policy-group", configParameters.getConsumerGroup());
+ assertEquals("TEST", configParameters.getEnvironmentName());
+ assertEquals("dummyPath", configParameters.getKeyStorePath());
+ assertEquals("password", configParameters.getKeyStorePassword());
+ assertEquals(false, configParameters.isActiveServerTlsAuth());
+ assertEquals(true, configParameters.isFilterInEmptyResources());
+ assertEquals(false, configParameters.isUseHttpsWithDmaap());
+ }
+
+ @Test
+ public void testSdcConfigurationWithNullList() {
+
+ final SdcReceptionHandlerConfigurationParameterBuilder builder =
+ new SdcReceptionHandlerConfigurationParameterBuilder().setAsdcAddress("localhost")
+ .setConsumerGroup("policy-group").setConsumerId("policy-id").setEnvironmentName("TEST")
+ .setKeystorePassword("password").setKeystorePath("dummyPath").setPassword("policy")
+ .setPollingInterval(10).setPollingTimeout(20).setUser("policy").setUseHttpsWithDmaap(false)
+ .setActiveserverTlsAuth(false).setFilterinEmptyResources(true)
+ .setArtifactTypes(Arrays.asList("TOSCA_CSAR")).setMessageBusAddress(null);
+ final SdcReceptionHandlerConfigurationParameterGroup configParameters =
+ new SdcReceptionHandlerConfigurationParameterGroup(builder);
+ configParameters.setName("SDCConfiguration");
+
+ try {
+ configParameters.validate();
+ fail("Test must throw an exception");
+ } catch (final Exception exp) {
+ assertTrue(exp.getMessage().contains("collection parameter \"messageBusAddress\" is null"));
+ }
+ }
+
+ @Test
+ public void testSdcConfigurationWithEmptyStringList() {
+
+ final SdcReceptionHandlerConfigurationParameterBuilder builder =
+ new SdcReceptionHandlerConfigurationParameterBuilder().setAsdcAddress("localhost")
+ .setConsumerGroup("policy-group").setConsumerId("policy-id").setEnvironmentName("TEST")
+ .setKeystorePassword("password").setKeystorePath("dummyPath").setPassword("policy")
+ .setPollingInterval(10).setPollingTimeout(20).setUser("policy").setUseHttpsWithDmaap(false)
+ .setActiveserverTlsAuth(false).setFilterinEmptyResources(true)
+ .setArtifactTypes(Arrays.asList("")).setMessageBusAddress(Arrays.asList("localhost"));
+ final SdcReceptionHandlerConfigurationParameterGroup configParameters =
+ new SdcReceptionHandlerConfigurationParameterGroup(builder);
+ configParameters.setName("SDCConfiguration");
+
+ final GroupValidationResult validationResult = configParameters.validate();
+ assertFalse(validationResult.isValid());
+ assertTrue(validationResult.getResult().contains("must be a non-blank string"));
+ }
+}
diff --git a/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/exceptions/ArtifactDownloadExceptionTest.java b/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/exceptions/ArtifactDownloadExceptionTest.java
new file mode 100644
index 0000000..6d275f7
--- /dev/null
+++ b/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/exceptions/ArtifactDownloadExceptionTest.java
@@ -0,0 +1,36 @@
+/*-
+ * ============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.exceptions;
+
+import static org.junit.Assert.assertNotNull;
+
+import java.io.IOException;
+
+import org.junit.Test;
+
+public class ArtifactDownloadExceptionTest {
+
+ @Test
+ public void test() {
+ assertNotNull(new ArtifactDownloadException("Message"));
+ assertNotNull(new ArtifactDownloadException("Message", new IOException()));
+ }
+}
diff --git a/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/exceptions/ArtifactInstallerExceptionTest.java b/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/exceptions/ArtifactInstallerExceptionTest.java
new file mode 100644
index 0000000..6c524ff
--- /dev/null
+++ b/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/exceptions/ArtifactInstallerExceptionTest.java
@@ -0,0 +1,36 @@
+/*-
+ * ============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.exceptions;
+
+import static org.junit.Assert.assertNotNull;
+
+import java.io.IOException;
+
+import org.junit.Test;
+
+public class ArtifactInstallerExceptionTest {
+
+ @Test
+ public void test() {
+ assertNotNull(new ArtifactInstallerException("Message"));
+ assertNotNull(new ArtifactInstallerException("Message", new IOException()));
+ }
+}
diff --git a/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/exceptions/PssdControllerExceptionTest.java b/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/exceptions/PssdControllerExceptionTest.java
new file mode 100644
index 0000000..5f8e507
--- /dev/null
+++ b/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/exceptions/PssdControllerExceptionTest.java
@@ -0,0 +1,36 @@
+/*-
+ * ============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.exceptions;
+
+import static org.junit.Assert.assertNotNull;
+
+import java.io.IOException;
+
+import org.junit.Test;
+
+public class PssdControllerExceptionTest {
+
+ @Test
+ public void test() {
+ assertNotNull(new PssdControllerException("Message"));
+ assertNotNull(new PssdControllerException("Message", new IOException()));
+ }
+}
diff --git a/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/exceptions/PssdParametersExceptionTest.java b/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/exceptions/PssdParametersExceptionTest.java
new file mode 100644
index 0000000..7a1f551
--- /dev/null
+++ b/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/exceptions/PssdParametersExceptionTest.java
@@ -0,0 +1,36 @@
+/*-
+ * ============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.exceptions;
+
+import static org.junit.Assert.assertNotNull;
+
+import java.io.IOException;
+
+import org.junit.Test;
+
+public class PssdParametersExceptionTest {
+
+ @Test
+ public void test() {
+ assertNotNull(new PssdParametersException("Message"));
+ assertNotNull(new PssdParametersException("Message", new IOException()));
+ }
+}