summaryrefslogtreecommitdiffstats
path: root/bpmn/mso-infrastructure-bpmn/src/test
diff options
context:
space:
mode:
authorOleksandr Moliavko <o.moliavko@samsung.com>2019-08-05 14:21:10 +0300
committerOleksandr Moliavko <o.moliavko@samsung.com>2019-08-05 14:23:08 +0300
commit28f75a4939502408b233823e34438b736abe1052 (patch)
tree57f4635200748e7659d1acad160e1f5533174f0c /bpmn/mso-infrastructure-bpmn/src/test
parente44fee30ac2abded56a37bfe8e312d880ef8db53 (diff)
Added null check for return value of
getUpdateResInputObj(), to prevent crash at call of toString() method Issue-ID: SO-1841 Signed-off-by: Oleksandr Moliavko <o.moliavko@samsung.com> Change-Id: Ifa6c683885490fef7fcf08e2b32b2dc76ef776a6
Diffstat (limited to 'bpmn/mso-infrastructure-bpmn/src/test')
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAndActivatePnfResourceTest.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAndActivatePnfResourceTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAndActivatePnfResourceTest.java
index 3ff240ebc2..fc0f51b032 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAndActivatePnfResourceTest.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAndActivatePnfResourceTest.java
@@ -63,7 +63,11 @@ public class CreateAndActivatePnfResourceTest extends BaseIntegrationTest {
public void shouldWaitForMessageFromDmaapAndUpdateAaiEntryWhenAaiEntryExists() {
// given
variables.put(PNF_CORRELATION_ID, PnfManagementTestImpl.ID_WITH_ENTRY);
- variables.put("resourceInput", getUpdateResInputObj("OLT").toString());
+ if (getUpdateResInputObj("OLT") != null) {
+ variables.put("resourceInput", getUpdateResInputObj("OLT").toString());
+ } else {
+ variables.put("resourceInput", null);
+ }
// when
ProcessInstance instance =
runtimeService.startProcessInstanceByKey("CreateAndActivatePnfResource", "businessKey", variables);