+ }
+
+ def 'Update cmHandle state to "DELETING"' (){
+ given: 'cm Handle as Yang model'
+ compositeState = new CompositeState(cmHandleState: READY)
+ yangModelCmHandle = new YangModelCmHandle(id: cmHandleId, dmiProperties: [], publicProperties: [], compositeState: compositeState)
+ when: 'updating cm handle state to "DELETING"'
+ objectUnderTest.updateCmHandleState(yangModelCmHandle, DELETING)
+ then: 'the cm handle state is as expected'
+ yangModelCmHandle.getCompositeState().getCmHandleState() == DELETING
+ and: 'method to persist cm handle state is called once'
+ 1 * mockInventoryPersistence.saveCmHandleState(yangModelCmHandle.getId(), yangModelCmHandle.getCompositeState())
+ and: 'the method to publish Lcm event is called once'
+ 1 * mockLcmEventsService.publishLcmEvent(cmHandleId, _)
+ }