Testing of threads -- passing arguments to threads