Unit testing & multithreading