On one occasion the Blessed One was living at SavatthI in Jeta's Grove, Anathapindika's Park. There he addressed the bhikkhus thus: "Bhikkhus, a bhikkhu who is an inquirer, not knowing how to gauge another's mind, should make an investigation of the Tathagata in order to find out whether or not he is fully enlightened."
The Bhikkhus replied: "Venerable sir, our teachings are rooted in the Blessed One, guided by the Blessed One, have the Blessed One as their resort. It would be good if the Blessed One would explain the meaning of these words. Having heard it from the Blessed One, the bhikkhus will remember it." Buddha: "Then bhikkhus, listen attentively to what I say." "Yes, venerable sir," the bhikkhus replied.
The Blessed One said this:"Bhikkhus, a bhikkhu who is an inquirer, not knowing how to gauge another's mind, should investigate the Tathagata with respect to two kinds of states, states cognizable through the eye and through the ear thus: 'Are there any defiled states cognizable through the eye or through the ear found in the Tathagata or not?' When he investigates him, he comes to know: 'No defiled states cognizable through the eye or through the ear are found in the Tathagata.' " "When he comes to know this, he investigates him further thus: 'Are there any mixed states cognizable through the eye or through the ear found in the Tathagata or not ? When he investigates him, he comes to know: 'No mixed states cognizable through the eye or through the ear are found in the Tathagata.'
"When he comes to know this, he investigates him further thus: 'Are there cleansed states cognizable through the eye or through the ear found in the Tathagata or not ?' When he investigates him, he comes to know: 'Cleansed states cognizable through the eye or through the ear are found in the Tathagata.' "
"When he comes to know this, he investigates him further: 'Has this venerable one attained this wholesome state over a long time or did he attain it recently?' When he investigates him, he comes to know: 'This venerable one has attained this wholesome state over a long time; he did not attain it only recently.'
"When he comes to know this, he investigates him further thus: 'Has this venerable one acquired renown and attained fame, so that the dangers [connected with renown and fame] are found in him?' For, bhikkhus, as long as a bhikkhu has not acquired renown and attained fame, the dangers are not found in him; but when he has acquired renown and attained fame, those dangers are found in him. When he investigates him, he comes to know: 'This venerable one has acquired renown and attained fame, but the dangers [connected with renown and fame] are not found in him.'
"When he comes to know this, he investigates him further thus: 'Is this venerable one restrained without fear, not restrained by fear, and does he avoid indulging in sensual pleasures because he is without lust through the destruction of lust?' When he investigates him, he comes to know: 'This venerable one is restrained without fear, not restrained by fear, and he avoids indulging in sensual pleasure because he is without lust through the destruction of lust.'
"Now, bhikkhus, if others should ask that bhikkhu thus: 'What are the venerable one's reasons and what is his evidence when he says: "That venerable one is restrained without fear, not restrained by fear, and he avoids indulging in sensual pleasures because he is without lust through the destruction of lust"?' In order to answer correctly, that bhikkhu would answer thus: 'Whether that venerable one dwells in the Sangha or alone, while some are well-behaved and some are ill-behaved and some there teach a group, while some here are seen concerned about material things and some are unsullied by material things, still that venerable one does not despise anyone because of that. And I have heard and learned this from the Blessed One's own lips: "I am restrained without fear, not restrained by fear, and I avoid indulging in sensual pleasures because I am without lust through the destruction of lust.'"
"The Tathagata, bhikkhus, should be questioned further about that thus: 'Are there any defiled states cognizable through the eye or through the ear found in the Tathagata or not?' The Tathagata would answer thus: 'No defiled states cognizable through the eye or through the ear are found in the Tathagata.'
"If asked, 'Are there any mixed states cognizable through the eye or through the ear found in the Tathagata or not ?' the Tathagata would answer thus: 'No mixed states cognizable through the eye or through the ear are found in the Tathagata.'
"If asked, 'Are there cleansed states cognizable through the eye or through the ear found in the Tathagata or not ?' the Tathagata would answer thus: 'Cleansed states cognizable through the eye or through the ear are found in the Tathagata. They are my pathway and my domain, yet I do not identify with them.'
"Bhikkhus, a disciple should approach the Teacher who speaks thus in order to hear the Dhamma. The Teacher teaches him the Dhamma with its higher and higher levels, with its more and more sublime levels, with its dark and bright counterparts. As the Teacher teaches the Dhamma to a bhikkhu in this way, through direct knowledge of a certain teaching here in that Dhamma, the bhikkhu comes to a conclusion about the teachings. He places confidence in the Teacher thus: 'The Blessed One is fully enlightened, the Dhamma is well proclaimed by the Blessed One, the Sangha is practicing the good way. "
"Now if others should ask that bhikkhu thus: 'What are the venerable one's reasons and what is his evidence whereby he says, "The Blessed One is fully enlightened, the Dhamma is well proclaimed by the Blessed One, the Sangha is practicing the good way"?' To answer rightly, that bhikkhu would answer thus: 'Here, friends, I approached the Blessed One in order to hear the Dhamma. The Blessed One taught me the Dhamma with its higher and higher levels, with its more and more sublime levels, with its dark and bright counterparts. As the Blessed One taught the Dhamma to me in this way, through direct knowledge of a certain teaching here in that Dhamma, I came to a conclusion about the teachings. I placed confidence in the Teacher thus: "The Blessed One is fully enlightened, the Dhamma is well proclaimed by the Blessed One, the Sangha is practicing the good way.'"
"Bhikkhus, when anyone's faith has been planted, rooted, and established in the Tathagata through these reasons, terms, and phrases, his faith is said to be supported by reasons, rooted in vision, firm; it is invincible by any recluse or brahmin or god or Mara or Brahma or by anyone in the world. That is how, bhikkhus, there is an investigation of the Tathagata in accordance with the Dhamma, and that is how the Tathagata is well investigated in accordance with the Dhamma."
That is what the Blessed One said. The bhikkhus were satisfied and delighted in the Blessed One's words.
Summary: The Buddha invited the monks to make a thorough investigation of himself in order to find out whether or not he can be accepted as fully enlightened. He instructed the monks to investigate if there were any defiled states, mixed states or cleansed states cognizable by the eye and ear in the Tathagatha?
They were also told to investigate if fear, indulgence in sensual pleasures and lust are found in the Tathagatha? The monks then concluded with confidence and faith that no defilements are seen in the Tathagatha and they said: "The Blessed One is fully enlightened, the Dhamma is well proclaimed by the Blessed One, the Sangha is practicing the good way.'"
References: 1. www.accesstoinsight.org 2. https://suttacentral.net/ 3. The middle length discourses of the Buddha (Bhikkhu Bodhi)