Merge "Add correlationId to ServiceInstancesRequest"
[so.git] / mso-api-handlers / mso-api-handler-infra / src / test / java / org / openecomp / mso / apihandlerinfra / E2EServiceInstancesTest.java
index 60ac6b9..901e03f 100644 (file)
@@ -40,12 +40,12 @@ import org.junit.Test;
 import org.openecomp.mso.apihandler.common.CamundaClient;
 import org.openecomp.mso.apihandler.common.RequestClient;
 import org.openecomp.mso.apihandler.common.RequestClientFactory;
+import org.openecomp.mso.apihandler.common.RequestClientParamater;
 import org.openecomp.mso.apihandler.common.ValidationException;
 import org.openecomp.mso.db.AbstractSessionFactoryManager;
 import org.openecomp.mso.db.catalog.CatalogDatabase;
 import org.openecomp.mso.db.catalog.beans.Service;
 import org.openecomp.mso.db.catalog.beans.ServiceRecipe;
-import org.openecomp.mso.properties.MsoDatabaseException;
 import org.openecomp.mso.properties.MsoJavaProperties;
 import org.openecomp.mso.properties.MsoPropertiesFactory;
 import org.openecomp.mso.requestsdb.OperationStatus;
@@ -194,12 +194,7 @@ public class E2EServiceInstancesTest {
 
                new MockUp<CamundaClient>() {
                        @Mock
-                       public HttpResponse post(String requestId, boolean isBaseVfModule,
-                                       int recipeTimeout, String requestAction,
-                                       String serviceInstanceId, String vnfId, String vfModuleId,
-                                       String volumeGroupId, String networkId, String configurationId, String serviceType,
-                                       String vnfType, String vfModuleType, String networkType,
-                                       String requestDetails, String recipeParamXsd) {
+                       public HttpResponse post(RequestClientParamater requestClientParamater) {
                                ProtocolVersion pv = new ProtocolVersion("HTTP", 1, 1);
                                HttpResponse resp = new BasicHttpResponse(pv, 202,
                                                "test response");
@@ -258,12 +253,7 @@ public class E2EServiceInstancesTest {
 
                new MockUp<CamundaClient>() {
                        @Mock
-                       public HttpResponse post(String requestId, boolean isBaseVfModule,
-                                       int recipeTimeout, String requestAction,
-                                       String serviceInstanceId, String vnfId, String vfModuleId,
-                                       String volumeGroupId, String networkId, String configurationId, String serviceType,
-                                       String vnfType, String vfModuleType, String networkType,
-                                       String requestDetails, String recipeParamXsd) {
+                       public HttpResponse post(RequestClientParamater requestClientParamater) {
                                ProtocolVersion pv = new ProtocolVersion("HTTP", 1, 1);
                                HttpResponse resp = new BasicHttpResponse(pv, 500,
                                                "test response");
@@ -323,12 +313,7 @@ public class E2EServiceInstancesTest {
 
                new MockUp<CamundaClient>() {
                        @Mock
-                       public HttpResponse post(String requestId, boolean isBaseVfModule,
-                                       int recipeTimeout, String requestAction,
-                                       String serviceInstanceId, String vnfId, String vfModuleId,
-                                       String volumeGroupId, String networkId, String configurationId, String serviceType,
-                                       String vnfType, String vfModuleType, String networkType,
-                                       String requestDetails, String recipeParamXsd) {
+                       public HttpResponse post(RequestClientParamater requestClientParamater) {
                                ProtocolVersion pv = new ProtocolVersion("HTTP", 1, 1);
                                HttpResponse resp = new BasicHttpResponse(pv, 500,
                                                "test response");
@@ -388,12 +373,7 @@ public class E2EServiceInstancesTest {
 
                new MockUp<CamundaClient>() {
                        @Mock
-                       public HttpResponse post(String requestId, boolean isBaseVfModule,
-                                       int recipeTimeout, String requestAction,
-                                       String serviceInstanceId, String vnfId, String vfModuleId,
-                                       String volumeGroupId, String networkId, String configurationId, String serviceType,
-                                       String vnfType, String vfModuleType, String networkType,
-                                       String requestDetails, String recipeParamXsd) {
+                       public HttpResponse post(RequestClientParamater requestClientParamater) {
                                HttpResponse resp = null;
                                return resp;
                        }
@@ -625,12 +605,7 @@ public class E2EServiceInstancesTest {
 
         final MockUp<CamundaClient> mockCmaundaClient = new MockUp<CamundaClient>() {
             @Mock
-            public HttpResponse post(String requestId, boolean isBaseVfModule,
-                                     int recipeTimeout, String requestAction, String serviceInstanceId,
-                                     String vnfId, String vfModuleId, String volumeGroupId, String networkId, String configurationId,
-                                     String serviceType, String vnfType, String vfModuleType, String networkType,
-                                     String requestDetails, String recipeParamXsd)
-                    throws ClientProtocolException, IOException {
+            public HttpResponse post(RequestClientParamater requestClientParamater) {
                 ProtocolVersion pv = new ProtocolVersion("HTTP", 1, 1);
                 HttpResponse resp = new BasicHttpResponse(pv, 200, "test response");
                 BasicHttpEntity entity = new BasicHttpEntity();
@@ -822,12 +797,7 @@ public class E2EServiceInstancesTest {
 
                new MockUp<CamundaClient>() {
                        @Mock
-                       public HttpResponse post(String requestId, boolean isBaseVfModule,
-                                       int recipeTimeout, String requestAction,
-                                       String serviceInstanceId, String vnfId, String vfModuleId,
-                                       String volumeGroupId, String networkId, String configurationId, String serviceType,
-                                       String vnfType, String vfModuleType, String networkType,
-                                       String requestDetails, String recipeParamXsd) {
+                       public HttpResponse post(RequestClientParamater requestClientParamater) {
                                ProtocolVersion pv = new ProtocolVersion("HTTP", 1, 1);
                                HttpResponse resp = new BasicHttpResponse(pv, 202,
                                                "test response");
@@ -888,12 +858,7 @@ public class E2EServiceInstancesTest {
 
                new MockUp<CamundaClient>() {
                        @Mock
-                       public HttpResponse post(String requestId, boolean isBaseVfModule,
-                                       int recipeTimeout, String requestAction,
-                                       String serviceInstanceId, String vnfId, String vfModuleId,
-                                       String volumeGroupId, String networkId, String configurationId, String serviceType,
-                                       String vnfType, String vfModuleType, String networkType,
-                                       String requestDetails, String recipeParamXsd) {
+                       public HttpResponse post(RequestClientParamater requestClientParamater) {
                                ProtocolVersion pv = new ProtocolVersion("HTTP", 1, 1);
                                HttpResponse resp = new BasicHttpResponse(pv, 202,
                                                "test response");
@@ -955,12 +920,7 @@ public class E2EServiceInstancesTest {
 
         new MockUp<CamundaClient>() {
             @Mock
-            public HttpResponse post(String requestId, boolean isBaseVfModule,
-                                     int recipeTimeout, String requestAction,
-                                     String serviceInstanceId, String vnfId, String vfModuleId,
-                                     String volumeGroupId, String networkId, String configurationId, String serviceType,
-                                     String vnfType, String vfModuleType, String networkType,
-                                     String requestDetails, String recipeParamXsd) {
+            public HttpResponse post(RequestClientParamater requestClientParamater) {
                 ProtocolVersion pv = new ProtocolVersion("HTTP", 1, 1);
                 HttpResponse resp = new BasicHttpResponse(pv, 202,
                         "test response");
@@ -1027,12 +987,7 @@ public class E2EServiceInstancesTest {
 
         new MockUp<CamundaClient>() {
             @Mock
-            public HttpResponse post(String requestId, boolean isBaseVfModule,
-                                     int recipeTimeout, String requestAction,
-                                     String serviceInstanceId, String vnfId, String vfModuleId,
-                                     String volumeGroupId, String networkId, String configurationId, String serviceType,
-                                     String vnfType, String vfModuleType, String networkType,
-                                     String requestDetails, String recipeParamXsd) {
+            public HttpResponse post(RequestClientParamater requestClientParamater) {
                 ProtocolVersion pv = new ProtocolVersion("HTTP", 1, 1);
                 HttpResponse resp = new BasicHttpResponse(pv, 202,
                         "test response");
@@ -1093,12 +1048,7 @@ public class E2EServiceInstancesTest {
 
         new MockUp<CamundaClient>() {
             @Mock
-            public HttpResponse post(String requestId, boolean isBaseVfModule,
-                                     int recipeTimeout, String requestAction,
-                                     String serviceInstanceId, String vnfId, String vfModuleId,
-                                     String volumeGroupId, String networkId, String configurationId, String serviceType,
-                                     String vnfType, String vfModuleType, String networkType,
-                                     String requestDetails, String recipeParamXsd) {
+            public HttpResponse post(RequestClientParamater requestClientParamater) {
                 ProtocolVersion pv = new ProtocolVersion("HTTP", 1, 1);
                 HttpResponse resp = new BasicHttpResponse(pv, 202,
                         "test response");
@@ -1160,12 +1110,7 @@ public class E2EServiceInstancesTest {
 
         MockUp<CamundaClient> client = new MockUp<CamundaClient>() {
             @Mock
-            public HttpResponse post(String requestId, boolean isBaseVfModule,
-                                     int recipeTimeout, String requestAction,
-                                     String serviceInstanceId, String vnfId, String vfModuleId,
-                                     String volumeGroupId, String networkId, String configurationId, String serviceType,
-                                     String vnfType, String vfModuleType, String networkType,
-                                     String requestDetails, String recipeParamXsd) throws Exception {
+            public HttpResponse post(RequestClientParamater requestClientParamater) throws Exception {
                 throw new Exception();
             }
         };
@@ -1192,13 +1137,7 @@ public class E2EServiceInstancesTest {
 
         new MockUp<CamundaClient>() {
             @Mock
-            public HttpResponse post(String requestId, boolean isBaseVfModule,
-                 int recipeTimeout, String requestAction, String serviceInstanceId,
-                 String vnfId, String vfModuleId, String volumeGroupId, String networkId, String configurationId,
-                 String serviceType, String vnfType, String vfModuleType, String networkType,
-                 String requestDetails, String recipeParamXsd)
-                    throws ClientProtocolException, IOException {
-
+            public HttpResponse post(RequestClientParamater requestClientParamater) throws IOException {
                 throw new ClientProtocolException();
             }
         };
@@ -1216,13 +1155,7 @@ public class E2EServiceInstancesTest {
 
         new MockUp<CamundaClient>() {
             @Mock
-            public HttpResponse post(String requestId, boolean isBaseVfModule,
-                                     int recipeTimeout, String requestAction, String serviceInstanceId,
-                                     String vnfId, String vfModuleId, String volumeGroupId, String networkId, String configurationId,
-                                     String serviceType, String vnfType, String vfModuleType, String networkType,
-                                     String requestDetails, String recipeParamXsd)
-                    throws ClientProtocolException, IOException {
-
+            public HttpResponse post(RequestClientParamater requestClientParamater) {
                 ProtocolVersion pv = new ProtocolVersion("HTTP", 1, 1);
                 HttpResponse resp = new BasicHttpResponse(pv, 202,
                         "compareModelwithTargetVersion, test response");
@@ -1291,12 +1224,7 @@ public class E2EServiceInstancesTest {
 
         final MockUp<CamundaClient> mockCamundaClient = new MockUp<CamundaClient>() {
             @Mock
-            public HttpResponse post(String requestId, boolean isBaseVfModule,
-                                     int recipeTimeout, String requestAction,
-                                     String serviceInstanceId, String vnfId, String vfModuleId,
-                                     String volumeGroupId, String networkId, String configurationId, String serviceType,
-                                     String vnfType, String vfModuleType, String networkType,
-                                     String requestDetails, String recipeParamXsd) {
+            public HttpResponse post(RequestClientParamater requestClientParamater) {
                 ProtocolVersion pv = new ProtocolVersion("HTTP", 1, 1);
                 HttpResponse resp = new BasicHttpResponse(pv, 202,
                         "test response");