Upgrade ACM version to 8.0.0 01/13501/1 master
authoraravind.est <aravindhan.a@est.tech>
Thu, 26 Sep 2024 14:31:48 +0000 (15:31 +0100)
committeraravind.est <aravindhan.a@est.tech>
Fri, 27 Sep 2024 12:49:04 +0000 (13:49 +0100)
ACM version upgraded to 8.0.0

Issue-ID: NONRTRIC-1030
Change-Id: Ia034ba08d1960b9a3e79c9f4d4c833aee3a6a637
Signed-off-by: aravind.est <aravindhan.a@est.tech>
openapi/acm/acm-spec.yaml
pom.xml
rapp-manager-acm/src/test/java/org/oransc/rappmanager/acm/service/AcmDeployerTest.java
rapp-manager-application/src/test/java/org/oransc/rappmanager/rest/RappControllerTest.java
rapp-manager-models/pom.xml
rapp-manager-models/src/test/java/org/oransc/rappmanager/models/csar/RappCsarConfigurationHandlerTest.java

index 6eae87b..70ae695 100755 (executable)
@@ -91,14 +91,14 @@ paths:
                 items:
                   $ref: '#/components/schemas/ParticipantInformation'
               example:
-                externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/getMultiParticipantResponse.json'
+                externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/getMultipleParticipantResponse.json'
             application/yaml:
               schema:
                 type: array
                 items:
                   $ref: '#/components/schemas/ParticipantInformation'
               example:
-                externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/getMultiParticipantResponse.yaml'
+                externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/getMultipleParticipantResponse.yaml'
         401:
           description: Authentication Error, returns an instance of
             [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
@@ -115,6 +115,22 @@ paths:
             application/json:
               schema:
                 $ref: '#/components/schemas/SimpleResponse'
+        500:
+          description: Internal Server Error, returns an instance of
+            [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
+          headers:
+            X-LatestVersion:
+              $ref: '#/components/headers/X-LatestVersion'
+            X-PatchVersion:
+              $ref: '#/components/headers/X-PatchVersion'
+            X-MinorVersion:
+              $ref: '#/components/headers/X-MinorVersion'
+            X-onap-RequestId:
+              $ref: '#/components/headers/X-onap-RequestId'
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/SimpleResponse'
       security:
         - basicAuth: []
       x-interface info:
@@ -179,6 +195,22 @@ paths:
             application/json:
               schema:
                 $ref: '#/components/schemas/SimpleResponse'
+        500:
+          description: Internal Server Error, returns an instance of
+            [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
+          headers:
+            X-LatestVersion:
+              $ref: '#/components/headers/X-LatestVersion'
+            X-PatchVersion:
+              $ref: '#/components/headers/X-PatchVersion'
+            X-MinorVersion:
+              $ref: '#/components/headers/X-MinorVersion'
+            X-onap-RequestId:
+              $ref: '#/components/headers/X-onap-RequestId'
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/SimpleResponse'
       security:
         - basicAuth: []
       x-interface info:
@@ -233,7 +265,7 @@ paths:
               schema:
                 $ref: '#/components/schemas/ToscaServiceTemplate'
               example:
-                externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/getParticipantResponse.yaml'
+                externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/getSingleParticipantResponse.yaml'
         401:
           description: Authentication Error, returns an instance of
             [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
@@ -266,6 +298,22 @@ paths:
             application/json:
               schema:
                 $ref: '#/components/schemas/SimpleResponse'
+        500:
+          description: Internal Server Error, returns an instance of
+            [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
+          headers:
+            X-LatestVersion:
+              $ref: '#/components/headers/X-LatestVersion'
+            X-PatchVersion:
+              $ref: '#/components/headers/X-PatchVersion'
+            X-MinorVersion:
+              $ref: '#/components/headers/X-MinorVersion'
+            X-onap-RequestId:
+              $ref: '#/components/headers/X-onap-RequestId'
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/SimpleResponse'
       security:
         - basicAuth: []
       x-interface info:
@@ -353,6 +401,22 @@ paths:
             application/json:
               schema:
                 $ref: '#/components/schemas/SimpleResponse'
+        500:
+          description: Internal Server Error, returns an instance of
+            [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
+          headers:
+            X-LatestVersion:
+              $ref: '#/components/headers/X-LatestVersion'
+            X-PatchVersion:
+              $ref: '#/components/headers/X-PatchVersion'
+            X-MinorVersion:
+              $ref: '#/components/headers/X-MinorVersion'
+            X-onap-RequestId:
+              $ref: '#/components/headers/X-onap-RequestId'
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/SimpleResponse'
       security:
         - basicAuth: []
       x-interface info:
@@ -430,6 +494,22 @@ paths:
             application/json:
               schema:
                 $ref: '#/components/schemas/SimpleResponse'
+        500:
+          description: Internal Server Error, returns an instance of
+            [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
+          headers:
+            X-LatestVersion:
+              $ref: '#/components/headers/X-LatestVersion'
+            X-PatchVersion:
+              $ref: '#/components/headers/X-PatchVersion'
+            X-MinorVersion:
+              $ref: '#/components/headers/X-MinorVersion'
+            X-onap-RequestId:
+              $ref: '#/components/headers/X-onap-RequestId'
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/SimpleResponse'
       security:
         - basicAuth: []
       x-interface info:
@@ -522,6 +602,22 @@ paths:
             application/json:
               schema:
                 $ref: '#/components/schemas/SimpleResponse'
+        500:
+          description: Internal Server Error, returns an instance of
+            [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
+          headers:
+            X-LatestVersion:
+              $ref: '#/components/headers/X-LatestVersion'
+            X-PatchVersion:
+              $ref: '#/components/headers/X-PatchVersion'
+            X-MinorVersion:
+              $ref: '#/components/headers/X-MinorVersion'
+            X-onap-RequestId:
+              $ref: '#/components/headers/X-onap-RequestId'
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/SimpleResponse'
       security:
         - basicAuth: []
       x-interface info:
@@ -609,6 +705,22 @@ paths:
             application/json:
               schema:
                 $ref: '#/components/schemas/SimpleResponse'
+        500:
+          description: Internal Server Error, returns an instance of
+            [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
+          headers:
+            X-LatestVersion:
+              $ref: '#/components/headers/X-LatestVersion'
+            X-PatchVersion:
+              $ref: '#/components/headers/X-PatchVersion'
+            X-MinorVersion:
+              $ref: '#/components/headers/X-MinorVersion'
+            X-onap-RequestId:
+              $ref: '#/components/headers/X-onap-RequestId'
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/SimpleResponse'
       security:
         - basicAuth: []
       x-interface info:
@@ -710,6 +822,22 @@ paths:
             application/json:
               schema:
                 $ref: '#/components/schemas/SimpleResponse'
+        500:
+          description: Internal Server Error, returns an instance of
+            [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
+          headers:
+            X-LatestVersion:
+              $ref: '#/components/headers/X-LatestVersion'
+            X-PatchVersion:
+              $ref: '#/components/headers/X-PatchVersion'
+            X-MinorVersion:
+              $ref: '#/components/headers/X-MinorVersion'
+            X-onap-RequestId:
+              $ref: '#/components/headers/X-onap-RequestId'
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/SimpleResponse'
       security:
         - basicAuth: []
       x-interface info:
@@ -809,6 +937,22 @@ paths:
             application/json:
               schema:
                 $ref: '#/components/schemas/SimpleResponse'
+        500:
+          description: Internal Server Error, returns an instance of
+            [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
+          headers:
+            X-LatestVersion:
+              $ref: '#/components/headers/X-LatestVersion'
+            X-PatchVersion:
+              $ref: '#/components/headers/X-PatchVersion'
+            X-MinorVersion:
+              $ref: '#/components/headers/X-MinorVersion'
+            X-onap-RequestId:
+              $ref: '#/components/headers/X-onap-RequestId'
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/SimpleResponse'
       security:
         - basicAuth: []
       x-interface info:
@@ -867,12 +1011,12 @@ paths:
               schema:
                 $ref: '#/components/schemas/AutomationCompositions'
               example:
-                externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/getCompositionInstancesResponse.json'
+                externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/getAllCompositionInstancesResponse.json'
             application/yaml:
               schema:
                 $ref: '#/components/schemas/AutomationCompositions'
               example:
-                externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/getCompositionInstancesResponse.yaml'
+                externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/getAllCompositionInstancesResponse.yaml'
         401:
           description: Authentication Error, returns an instance of
             [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
@@ -905,6 +1049,22 @@ paths:
             application/json:
               schema:
                 $ref: '#/components/schemas/SimpleResponse'
+        500:
+          description: Internal Server Error, returns an instance of
+            [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
+          headers:
+            X-LatestVersion:
+              $ref: '#/components/headers/X-LatestVersion'
+            X-PatchVersion:
+              $ref: '#/components/headers/X-PatchVersion'
+            X-MinorVersion:
+              $ref: '#/components/headers/X-MinorVersion'
+            X-onap-RequestId:
+              $ref: '#/components/headers/X-onap-RequestId'
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/SimpleResponse'
       security:
         - basicAuth: []
       x-interface info:
@@ -913,14 +1073,15 @@ paths:
     post:
       tags:
         - Automation Composition Instance
-      summary: Create automation composition instance
-      description: Creates automation composition instance that use the sepcified automation composition definition. The ID of the created
-        automation composition instance is returned.
+      summary: Create, Update or Migrate an automation composition instance
+      description: Create, Update or Migrate an automation composition instance that uses the specified automation composition definition. The ID of the created
+        automation composition instance is returned. In the case of an update, the instanceId should be included in the request body.
+        In the case of a migrate, the instanceId and the compositionTargetId should be included in the request body.
       operationId: createCompositionInstance
       parameters:
         - name : compositionId
           in: path
-          description: The UUID of the automation composition definition on which to create instance
+          description: The UUID of the automation composition definition on which to create/update instance
           required: true
           schema:
             type: string
@@ -934,24 +1095,34 @@ paths:
       requestBody:
         description: Serialised instance of
           [AutomationComposition](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/AutomationComposition.java)
-          containing a automation composition instance to create
+          containing a automation composition instance to create/update
         content:
           application/json:
             schema:
               $ref: '#/components/schemas/AutomationComposition'
-            example:
-              externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/postCompositionInstance.json'
+            examples:
+              createValue:
+                summary: create
+                externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/postCompositionInstance.json'
+              updateValue:
+                summary: update
+                externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/postCompositionInstanceUpdate.json'
           application/yaml:
             schema:
               $ref: '#/components/schemas/AutomationComposition'
-            example:
-              externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/postCompositionInstance.yaml'
+            examples:
+              createValue:
+                summary: create
+                externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/postCompositionInstance.yaml'
+              updateValue:
+                summary: update
+                externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/postCompositionInstanceUpdate.yaml'
         required: true
       responses:
         201:
           description: Serialised instance of
             [InstantiationResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/instantiation/InstantiationResponse.java)
-            containing the UUID of the created automation composition instance
+            containing the UUID of the created/updated automation composition instance
           headers:
             X-LatestVersion:
               $ref: '#/components/headers/X-LatestVersion'
@@ -966,12 +1137,12 @@ paths:
               schema:
                 $ref: '#/components/schemas/InstantiationResponse'
               example:
-                externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/postCompositionInstancesResponse.json'
+                externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/postCompositionInstanceResponse.json'
             application/yaml:
               schema:
                 $ref: '#/components/schemas/InstantiationResponse'
               example:
-                externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/postCompositionInstancesResponse.yaml'
+                externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/postCompositionInstanceResponse.yaml'
         401:
           description: Authentication Error, returns an instance of
             [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
@@ -1020,6 +1191,22 @@ paths:
             application/json:
               schema:
                 $ref: '#/components/schemas/SimpleResponse'
+        500:
+          description: Internal Server Error, returns an instance of
+            [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
+          headers:
+            X-LatestVersion:
+              $ref: '#/components/headers/X-LatestVersion'
+            X-PatchVersion:
+              $ref: '#/components/headers/X-PatchVersion'
+            X-MinorVersion:
+              $ref: '#/components/headers/X-MinorVersion'
+            X-onap-RequestId:
+              $ref: '#/components/headers/X-onap-RequestId'
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/SimpleResponse'
       security:
         - basicAuth: []
       x-interface info:
@@ -1111,6 +1298,22 @@ paths:
             application/json:
               schema:
                 $ref: '#/components/schemas/SimpleResponse'
+        500:
+          description: Internal Server Error, returns an instance of
+            [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
+          headers:
+            X-LatestVersion:
+              $ref: '#/components/headers/X-LatestVersion'
+            X-PatchVersion:
+              $ref: '#/components/headers/X-PatchVersion'
+            X-MinorVersion:
+              $ref: '#/components/headers/X-MinorVersion'
+            X-onap-RequestId:
+              $ref: '#/components/headers/X-onap-RequestId'
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/SimpleResponse'
       security:
         - basicAuth: []
       x-interface info:
@@ -1221,6 +1424,22 @@ paths:
             application/json:
               schema:
                 $ref: '#/components/schemas/SimpleResponse'
+        500:
+          description: Internal Server Error, returns an instance of
+            [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
+          headers:
+            X-LatestVersion:
+              $ref: '#/components/headers/X-LatestVersion'
+            X-PatchVersion:
+              $ref: '#/components/headers/X-PatchVersion'
+            X-MinorVersion:
+              $ref: '#/components/headers/X-MinorVersion'
+            X-onap-RequestId:
+              $ref: '#/components/headers/X-onap-RequestId'
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/SimpleResponse'
       security:
         - basicAuth: []
       x-interface info:
@@ -1231,7 +1450,7 @@ paths:
       tags:
         - Automation Composition Instance
       summary: Delete an automation composition instance
-      description: Deletes a automation composition instance, returning the UUID of the deleted automation composition instance
+      description: Order a deletion of an automation composition instance, returning the UUID of the automation composition instance to be deleted
       operationId: deleteCompositionInstance
       parameters:
         - name : compositionId
@@ -1255,7 +1474,7 @@ paths:
             type: string
             format: uuid
       responses:
-        200:
+        202:
           description: Serialised instance of
             [InstantiationResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/instantiation/InstantiationResponse.java)
             containing the UUID of the deleted automation composition instance
@@ -1327,6 +1546,22 @@ paths:
             application/json:
               schema:
                 $ref: '#/components/schemas/SimpleResponse'
+        500:
+          description: Internal Server Error, returns an instance of
+            [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
+          headers:
+            X-LatestVersion:
+              $ref: '#/components/headers/X-LatestVersion'
+            X-PatchVersion:
+              $ref: '#/components/headers/X-PatchVersion'
+            X-MinorVersion:
+              $ref: '#/components/headers/X-MinorVersion'
+            X-onap-RequestId:
+              $ref: '#/components/headers/X-onap-RequestId'
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/SimpleResponse'
       security:
         - basicAuth: []
       x-interface info:
@@ -1385,4 +1620,4 @@ components:
     X-onap-RequestId:
       schema:
         type: string
-        format: uuid
+        format: uuid
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index c52da62..b83bdbc 100755 (executable)
--- a/pom.xml
+++ b/pom.xml
@@ -52,7 +52,7 @@
         <openapi.maven.version>7.3.0</openapi.maven.version>
         <docker-maven-plugin>0.45.0</docker-maven-plugin>
         <jacoco-maven-plugin.version>0.8.12</jacoco-maven-plugin.version>
-        <onap.acm.models.version>7.1.1</onap.acm.models.version>
+        <onap.acm.models.version>8.0.0</onap.acm.models.version>
         <openapi.jackson.databind.nullable.version>0.2.6</openapi.jackson.databind.nullable.version>
         <spring.statemachine.version>4.0.0</spring.statemachine.version>
         <spring.context.version>6.1.3</spring.context.version>
@@ -65,6 +65,7 @@
         <exec-maven-plugin.version>3.4.1</exec-maven-plugin.version>
         <copy-resources-maven-plugin.version>3.3.1</copy-resources-maven-plugin.version>
         <apache.compress.version>1.27.1</apache.compress.version>
+        <guava.version>33.3.0-jre</guava.version>
     </properties>
     <build>
         <plugins>
index 134b30a..406ec31 100644 (file)
@@ -52,6 +52,7 @@ import org.onap.policy.clamp.models.acm.concepts.LockState;
 import org.onap.policy.clamp.models.acm.messages.rest.commissioning.CommissioningResponse;
 import org.onap.policy.clamp.models.acm.messages.rest.commissioning.PrimeOrder;
 import org.onap.policy.clamp.models.acm.messages.rest.instantiation.InstantiationResponse;
+import org.onap.policy.clamp.models.acm.utils.TimestampHelper;
 import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate;
 import org.oransc.rappmanager.acm.configuration.ACMConfiguration;
 import org.oransc.rappmanager.dme.service.DmeAcmInterceptor;
@@ -588,6 +589,7 @@ class AcmDeployerTest {
         automationCompositionDefinition.setCompositionId(compositionId);
         automationCompositionDefinition.setState(acTypeState);
         automationCompositionDefinition.setServiceTemplate(new ToscaServiceTemplate());
+        automationCompositionDefinition.setLastMsg(TimestampHelper.now());
         return automationCompositionDefinition;
     }
 }
index 15165b7..01d9749 100644 (file)
@@ -29,7 +29,6 @@ import java.io.File;
 import java.io.FileInputStream;
 import java.util.List;
 import java.util.UUID;
-import org.apache.http.entity.ContentType;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.EnumSource;
@@ -119,7 +118,7 @@ class RappControllerTest {
     void testCreateRapp() throws Exception {
         String rappCsarPath = validCsarFileLocation + File.separator + validRappFile;
         MockMultipartFile multipartFile =
-                new MockMultipartFile("file", validRappFile, ContentType.MULTIPART_FORM_DATA.getMimeType(),
+                new MockMultipartFile("file", validRappFile, MediaType.MULTIPART_FORM_DATA.getType(),
                         new FileInputStream(rappCsarPath));
         mockMvc.perform(MockMvcRequestBuilders.multipart("/rapps/{rapp_id}", UUID.randomUUID()).file(multipartFile))
                 .andExpect(status().isAccepted());
@@ -132,7 +131,7 @@ class RappControllerTest {
     void testCreateInvalidRapp(String rAppPackageName) throws Exception {
         String rappCsarPath = validCsarFileLocation + File.separator + rAppPackageName;
         MockMultipartFile multipartFile =
-                new MockMultipartFile("file", rAppPackageName, ContentType.MULTIPART_FORM_DATA.getMimeType(),
+                new MockMultipartFile("file", rAppPackageName, MediaType.MULTIPART_FORM_DATA.getType(),
                         new FileInputStream(rappCsarPath));
         mockMvc.perform(MockMvcRequestBuilders.multipart("/rapps/{rapp_id}", UUID.randomUUID()).file(multipartFile))
                 .andExpect(status().isBadRequest());
index 7275e88..ea10ef7 100755 (executable)
             <artifactId>spring-statemachine-core</artifactId>
             <version>${spring.statemachine.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-json</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.springframework.statemachine</groupId>
             <artifactId>spring-statemachine-test</artifactId>
             <groupId>com.google.code.gson</groupId>
             <artifactId>gson</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+            <version>${guava.version}</version>
+        </dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-test</artifactId>
index d9ee602..13bc2f8 100644 (file)
@@ -213,7 +213,7 @@ class RappCsarConfigurationHandlerTest {
     }
 
     @Test
-    void testGetSmeInvokerPayload() {
+    void testGetSmeInvokerPayload() throws JSONException {
         UUID rappId = UUID.randomUUID();
         RappSMEInstance rappSMEInstance = new RappSMEInstance();
         rappSMEInstance.setInvokers("invoker-app1");