Add tests on thread.