+ def 'Exception thrown on CM-Handle registration update request'() {
+ given: 'a CM-handle registration'
+ def objectUnderTest = getObjectUnderTestWithModelSyncDisabled()
+ and: 'dmi plugin registration input update request'
+ def dmiPluginReg = new DmiPluginRegistration();
+ dmiPluginReg.dmiPlugin = 'onap.dmap.plugin';
+ dmiPluginReg.updatedCmHandles = [new CmHandle(cmHandleID: 'unknownHandle')]
+ and: 'update data node leaves is unable to find data node'
+ mockNetworkCmProxyDataServicePropertyHandler.updateCmHandleProperties(*_) >> { throw new DataNodeNotFoundException('NCMP-Admin', 'ncmp-dmi-registry') }
+ when: 'update dmi registration is called'
+ objectUnderTest.updateDmiRegistrationAndSyncModule(dmiPluginReg)
+ then: 'data validation exception is thrown'
+ def exceptionThrown = thrown(DataValidationException.class)
+ assert exceptionThrown.getDetails().contains('DataNode not found')
+ }
+