finished unit test for thread manager