From 28f75a4939502408b233823e34438b736abe1052 Mon Sep 17 00:00:00 2001 From: Oleksandr Moliavko Date: Mon, 5 Aug 2019 14:21:10 +0300 Subject: 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 Change-Id: Ifa6c683885490fef7fcf08e2b32b2dc76ef776a6 --- .../pnf/delegate/CreateAndActivatePnfResourceTest.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bpmn/mso-infrastructure-bpmn') 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); -- cgit 1.2.3-korg