public async Task Delay_Message_ThrowsWhenCountersThrows() { perfCounters.Setup(c => c.DelayMessage()).Throws(new ApplicationException()); var now = clock.Object.UtcNow; var context = new QueueContext { MessageData = new QueueMessage { Id = 12345, NotBefore = now, }, SourceQueue = "SourceQueue" }; await reader.DelayMessage(context, 1000); }