Tests for deleting a thread.