Added unit tests for listing threads.