+
+ def 'Delete resource data in pass-through running datastore.' () {
+ given: 'delete resource data url'
+ def url = "$ncmpBasePathV1/ch/testCmHandle/data/ds/ncmp-datastore:passthrough-running" +
+ "?resourceIdentifier=parent/child"
+ when: 'delete data resource request is performed'
+ def response = mvc.perform(
+ delete(url).contentType(MediaType.APPLICATION_JSON).accept(MediaType.APPLICATION_JSON)
+ .content('{"some-key" : "some-value"}')).andReturn().response
+ then: 'the ncmp service method to delete resource is called'
+ 1 * mockNetworkCmProxyDataService.writeResourceDataPassThroughRunningForCmHandle('testCmHandle',
+ 'parent/child', DELETE, '{"some-key" : "some-value"}', 'application/json;charset=UTF-8')
+ and: 'the response is No Content'
+ response.status == HttpStatus.NO_CONTENT.value()
+ }