X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=cps-ncmp-service%2Fsrc%2Ftest%2Fgroovy%2Forg%2Fonap%2Fcps%2Fncmp%2Fapi%2Finventory%2FCompositeStateSpec.groovy;h=76c4d225b17a9ba8685a7e0234e555afce0d685d;hb=4e596846aa6f1b799487c553d6830004489d96a1;hp=bf42fbfeea9068fc6df39b266764e12da2964933;hpb=7914c8924723092345e8b4d829f15d2a3a5c72c8;p=cps.git diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/inventory/CompositeStateSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/inventory/CompositeStateSpec.groovy index bf42fbfee..76c4d225b 100644 --- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/inventory/CompositeStateSpec.groovy +++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/inventory/CompositeStateSpec.groovy @@ -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() {