Testing multi-threaded code is tricky, the test and the code under test most likely are run under different threads. Here, we will discuss how to deal with the issue based on the book Growing Object-Oriented Software Guided by Tests