Functional test for add thread.