Simplified 'External' lock reason Mapping
[cps.git] / cps-ncmp-service / src / test / groovy / org / onap / cps / ncmp / api / inventory / CompositeStateSpec.groovy
index bf42fbf..76c4d22 100644 (file)
@@ -41,15 +41,15 @@ class CompositeStateSpec extends Specification {
     def "Composite State Specification"() {
         given: "a Composite State"
             def compositeState = new CompositeState(cmHandleState: CmHandleState.ADVISED,
-                lockReason: CompositeState.LockReason.builder().lockReasonCategory(LockReasonCategory.LOCKED_MISBEHAVING).details("lock misbehaving details").build(),
+                lockReason: CompositeState.LockReason.builder().lockReasonCategory(LockReasonCategory.LOCKED_MODULE_SYNC_FAILED).details("lock details").build(),
                 lastUpdateTime: formattedDateAndTime.toString(),
                 dataSyncEnabled: false,
                 dataStores: dataStores())
         when: 'it is represented as JSON'
-            def jsonStateModelAsString = objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(compositeState)
+            def resultJson = objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(compositeState)
         then: 'it matches expected state model as JSON'
-            def expectedStateModelAsjson = getResourceFileContent('expectedStateModel.json')
-            assert trimAllWhitespace(expectedStateModelAsjson) == trimAllWhitespace(jsonStateModelAsString)
+            def expectedJson = getResourceFileContent('expectedStateModel.json')
+            assert trimAllWhitespace(expectedJson) == trimAllWhitespace(resultJson)
     }
 
     def dataStores() {