public void Domain_event_should_be_published_when_a_failed_message_is_detected() { var failedMessage = new FailedMessage(); service.MonitorFailedMessagesStores(adressOfFailedMessagesStore); RaiseFailedMessageEvent(failedMessage); domainEvents.AssertWasCalled(x => x.Publish(Arg <FailedMessageDetectedEvent> .Matches(e => e.FailedMessage == failedMessage))); }