+ def 'Exception is thrown while publishing the notification.'(){
+ given: 'schema set for given anchor and dataspace references test-tree model'
+ setupSchemaSetMocks('test-tree.yang')
+ when: 'publisher set to throw an exception'
+ mockDataUpdateEventsService.publishCpsDataUpdateEvent(_, _, _, _) >> { throw new Exception("publishing failed")}
+ and: 'an update event is performed'
+ objectUnderTest.updateNodeLeaves(dataspaceName, anchorName, '/', '{"test-tree": {"branch": []}}', observedTimestamp)
+ then: 'the exception is not bubbled up'
+ noExceptionThrown()
+ and: "the exception message is logged"
+ def logs = loggingListAppender.list.toString()
+ assert logs.contains('Failed to send message to notification service')
+ }