+
+ def 'Delete list node child elements.'() {
+ given: 'list node xpath'
+ def listNodeXpath = 'list node xpath'
+ when: 'delete is invoked list-node endpoint'
+ def response = mvc.perform(
+ delete("$dataNodeBaseEndpoint/anchors/$anchorName/list-node")
+ .param('xpath', listNodeXpath)
+ ).andReturn().response
+ then: 'a success response is returned'
+ response.status == HttpStatus.NO_CONTENT.value()
+ then: 'the java API was called with the correct parameters'
+ 1 * mockCpsDataService.deleteListNodeData(dataspaceName, anchorName, listNodeXpath)
+ }