public async Task SendMessage() { using (var queue = ServiceBusEntityFactory.DeleteAndCreateQueue("integration-queue-sender")) { var id = Guid.NewGuid().ToString(); var sender = new QueueMessageSender(queue.Client); await sender.SendAsync(new BrokeredMessage { MessageId = id }); var messages = queue.Client.ReceiveBatch(250).ToArray(); Assert.Equal(1, messages.Length); Assert.Equal(id, messages[0].MessageId); } }