add unittests for threadpool