title: Testing a background worker with rhino mocks
body: <p>lets say i have a background worker in a class that perform db query in a background thread.</p>
  
  <p>i wanna test this class</p>
  
  <p>so i mock my db and return some collection so far so good,
  make sure my background worker called the do work 
  and than i wanna make sure that the finish also happened.</p>
  
  <p>I've noticed that the test pass and fail randomly (i think it has something to do with threads)</p>
  
  <p>any suggestions</p>