Added thread pool functional test.