Turing test
Later on, people narrowed down the test. A human is unlikely to know everything. Therefore, both the human and the machine would be specialists in some field of knowledge. So would the person asking.