Writing tests of asynchronous code can be very tricky. You often have to resort to calling Thread.Sleep or Task.Delay within an asynchronous callback so you can control the timing and assert what you need to assert. For the most part, these are ugly hacks. What you really want is a way to control execution timing with fine grained control. Here's the good news. When you use Reactive Extensions (Rx), you have such a device at your disposal!