It is narrated from Sayyiduna Anas bin Malik (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "When the deceased is placed in his grave and his companions turn away and depart from him, and he indeed hears the sound of their sandals, two angels come to him and make him sit up. They both ask him: 'What did you used to say about this man (meaning Muhammad (peace and blessings be upon him))?' As for the believer, he answers: 'I bear witness that he is the servant of Allah and His Messenger.' Then it is said to him: 'Look at this place of yours in Hell; Allah has given you in exchange for it a place in Paradise.' So he (the believer) sees both places together."
Hadith Referenceالمعجم الأوسط / باب الميم / 7025
Hadith Takhrij«أخرجه البخاري فى «صحيحه» برقم: 1338، 1374، ومسلم فى «صحيحه» برقم: 2870، وابن حبان فى «صحيحه» برقم: 3120، والنسائي فى «المجتبى» برقم: 2049 / 1، 2048 / 1، 2050 / 1، والنسائي فى «السنن الكبرى» برقم: 2188، 2187، 2189، وأبو داود فى «سننه» برقم: 3231، 3184، والبيهقي فى «السنن الكبرى» برقم: 7317، وأحمد فى «مسنده» برقم: 12465، 13650، وعبد بن حميد فى «مسنده» برقم: 1180، والبزار فى «مسنده» برقم: 7047، 7046»