Asma bint Abi Bakr (may Allah be pleased with her) said: The sun was eclipsed in the time of the Prophet (peace and blessings be upon him), so I went to Aishah (may Allah be pleased with her) while she was praying. I said: "What is the matter with the people that they are praying (like this)?" Aishah (may Allah be pleased with her) pointed with her head towards the sky. I said: "Is this a (special) sign?" She said: "Yes." The Messenger of Allah (peace and blessings be upon him) stood for a very long time, until I was overcome by faintness. I took a small waterskin that was beside me and began pouring water on my head. When the Prophet (peace and blessings be upon him) finished the prayer, the sun had become bright. The Prophet (peace and blessings be upon him) addressed the people; he praised and extolled Allah, then said: "There is nothing that you have been promised but I have seen it in this place of mine, even Paradise and Hell. And it has been revealed to me that you will be tested in the graves with a trial like, or close to, the trial of the Dajjal (the False Messiah)." (Asma (may Allah be pleased with her) said that he (peace and blessings be upon him) said:) "Each one of you will be brought and asked: 'What do you know about this man?' The believer, or the one with certainty, will say: 'He is Muhammad (peace and blessings be upon him), he is the Messenger of Allah; he came to us with clear proofs and guidance, so we accepted what he said and obeyed him.' He will say this three times. Then it will be said to that believer: 'We knew that you believed in him, so sleep in peace.' And the hypocrite or the doubter will say: 'I do not know who he is; I heard the people saying something, so I said it too.'"
Hadith Referenceالسنن الكبرى للبيهقي / كتاب صلاة الخسوف / 6360