#117 Test case for "search in terminal state" problem