Added functional test for listing threads.