def dataNode = new DataNode(childDataNodes:childDataNodes, leaves: leaves)
mockCpsDataService.getDataNode('NCMP-Admin', 'ncmp-dmi-registry', xpath, INCLUDE_ALL_DESCENDANTS) >> dataNode
when: 'retrieving the yang modelled cm handle'
def dataNode = new DataNode(childDataNodes:childDataNodes, leaves: leaves)
mockCpsDataService.getDataNode('NCMP-Admin', 'ncmp-dmi-registry', xpath, INCLUDE_ALL_DESCENDANTS) >> dataNode
when: 'retrieving the yang modelled cm handle'
then: 'the result has the correct id and service names'
result.id == cmHandleId
result.dmiServiceName == 'common service name'
then: 'the result has the correct id and service names'
result.id == cmHandleId
result.dmiServiceName == 'common service name'
def "Retrieve CmHandle using datanode with invalid CmHandle id."() {
when: 'retrieving the yang modelled cm handle with an invalid id'
def "Retrieve CmHandle using datanode with invalid CmHandle id."() {
when: 'retrieving the yang modelled cm handle with an invalid id'
then: 'a data validation exception is thrown'
thrown(DataValidationException)
and: 'the result is not returned'
then: 'a data validation exception is thrown'
thrown(DataValidationException)
and: 'the result is not returned'