Sayyiduna Anas bin Malik (may Allah be pleased with him) said that they used to write at the beginning of their wills: This is the will of so-and-so son of so-and-so; he testifies that 'La ilaha illallahu wahdahu la sharika lahu' (there is no god but Allah alone, He has no partner), and 'wa anna Muhammadan 'abduhu wa rasuluhu' (and that Muhammad (peace and blessings be upon him) is His servant and His Messenger), and that "the Hour is coming, there is no doubt about it, and Allah will raise up those who are in the graves" [Surah al-Hajj: 7]; and they enjoined those after them to fear Allah "as He deserves to be feared" [Surah Al Imran: 102], to "live in harmony among themselves" [Surah al-Anfal: 1], and to "obey Allah and His Messenger (peace and blessings be upon him), if they are believers" [Surah al-Anfal: 1]; and they would enjoin upon them what Ibrahim (peace be upon him) and Ya'qub (peace be upon him) enjoined upon their sons: "O my sons, Allah has chosen the religion for you, so do not die except in a state of Islam" [Surah al-Baqarah: 132].
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الوصايا / 12683