summaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-tasks/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/test/java')
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java18
1 files changed, 14 insertions, 4 deletions
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java
index c74f590e6b..93d4b413f8 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java
@@ -24,10 +24,7 @@ package org.onap.so.bpmn.infrastructure.workflow.tasks;
import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.CoreMatchers.equalTo;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertThat;
+import static org.junit.Assert.*;
import static org.mockito.ArgumentMatchers.anyObject;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Matchers.isA;
@@ -1329,6 +1326,19 @@ public class WorkflowActionTest extends BaseTaskTest {
execution.getVariable("WorkflowActionErrorMessage"));
}
+ @Test
+ public void verifyLackOfNullPointerExceptionForNullResource(){
+ ExecuteBuildingBlock result = null;
+ try {
+ result = workflowAction
+ .buildExecuteBuildingBlock(new OrchestrationFlow(), null, null, null, null, null, false,
+ null, null, null, false, null, true);
+ }catch (NullPointerException e){
+ fail("NullPointerException should not be thrown when 'resource' is null");
+ }
+ assertNotNull(result);
+ }
+
private List<OrchestrationFlow> createFlowList (String... flowNames){
List<OrchestrationFlow> result = new ArrayList<>();
for(String flowName : flowNames){