Add thread test unit test.