Enable ControllerExecutionBB for service scope
[so.git] / bpmn / MSOCommonBPMN / src / test / java / org / onap / so / client / cds / ConfigureInstanceParamsForVnfTest.java
index 547129e..6466da5 100644 (file)
@@ -28,6 +28,7 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
+import java.util.Optional;
 import java.util.UUID;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -64,7 +65,7 @@ public class ConfigureInstanceParamsForVnfTest {
         Resources resources = new Resources();
         resources.setVnfs(createVnfs());
         service.setResources(resources);
-        when(extractServiceFromUserParameters.getServiceFromRequestUserParams(any())).thenReturn(service);
+        when(extractServiceFromUserParameters.getServiceFromRequestUserParams(any())).thenReturn(Optional.of(service));
         JsonObject jsonObject = new JsonObject();
 
         configureInstanceParamsForVnf.populateInstanceParams(jsonObject, new ArrayList<>(), VNF_2_CUSTOMIZATION_ID,
@@ -81,7 +82,7 @@ public class ConfigureInstanceParamsForVnfTest {
         Resources resources = new Resources();
         resources.setVnfs(createVnfs());
         service.setResources(resources);
-        when(extractServiceFromUserParameters.getServiceFromRequestUserParams(any())).thenReturn(service);
+        when(extractServiceFromUserParameters.getServiceFromRequestUserParams(any())).thenReturn(Optional.of(service));
         JsonObject jsonObject = new JsonObject();
 
         // No instance name is passed