title: Is there a way to unit test an async method?
body: <p>I am using Xunit and NMock on .NET platform.
  I am testing a presentation model where a method is asynchronous.
  The method creates an async task and executes it so the method returns immediately and the state I need to check aren't ready yet.</p>
  
  <p>I can set a flag upon finish without modifying the SUT but that would mean I would have to keep checking the flag in a while loop for example, with perhaps timeout.</p>
  
  <p>What are my options?</p>