Adding basic test for thread state (See PR-15824)