+ def 'Update and Publish Events on State Change from DELETING to ADVISED'() {
+ given: 'Cm Handle represented as YangModelCmHandle in DELETING state'
+ yangModelCmHandle = new YangModelCmHandle(id: cmHandleId, dmiProperties: [], publicProperties: [], compositeState: compositeState)
+ when: 'update state is invoked'
+ objectUnderTest.updateCmHandleState(yangModelCmHandle, ADVISED)
+ then: 'the cm handle is saved using inventory persistence'
+ 1 * mockInventoryPersistence.saveCmHandle(yangModelCmHandle)
+ and: 'event service is called to publish event'
+ 1 * mockLcmEventsService.publishLcmEvent(cmHandleId, _, _)
+ }
+