+ assert response == '{dmi-response}'
+ }
+
+ def 'Get resource data for operational (cached) data.'() {
+ given: 'CPS Data service returns some object(s)'
+ mockCpsDataService.getDataNodes(OPERATIONAL.datastoreName, 'testCmHandle', 'testResourceId', FetchDescendantsOption.OMIT_DESCENDANTS) >> ['First Object', 'other Object']
+ when: 'get resource data is called'
+ def response = objectUnderTest.getResourceDataForCmHandle(OPERATIONAL.datastoreName, 'testCmHandle', 'testResourceId', FetchDescendantsOption.OMIT_DESCENDANTS)
+ then: 'get resource data returns teh first object from the data service'
+ assert response == 'First Object'
+ }
+
+ def 'Execute (async) data operation for #datastoreName from DMI.'() {
+ given: 'cpsDataService returns valid data node'
+ def dataOperationRequest = getDataOperationRequest(datastoreName)
+ when: 'request resource data for data operation is called'
+ objectUnderTest.executeDataOperationForCmHandles('some topic', dataOperationRequest, 'requestId')
+ then: 'request resource data for data operation returns expected response'
+ 1 * mockDmiDataOperations.requestResourceDataFromDmi('some topic', dataOperationRequest, 'requestId')
+ where: 'the following data stores are used'
+ datastoreName << [PASSTHROUGH_RUNNING.datastoreName, PASSTHROUGH_OPERATIONAL.datastoreName]