I have an Azure Service Bus Trigger function that has the job of replicating the incoming message from a topic and sending it to another service bus topic.
I send the incoming message to the service bus in the other region using Azure.Messaging.ServiceBus.ServiceBusSender.SendMessageAsync()
I need to write a xUnit test to ensure the right behaviour is being followed when the topic/service bus in the other region is unavailable. Is there a way to simulate the SendMessageAsync() method throwing one of the transient exceptions to test this?