Sayyiduna Muawiyah bin Qurrah narrates from his father that the Noble Prophet (peace and blessings be upon him) said: "When the time of death approaches a person and he makes a will, then according to the command of Allah's Book, if he has made a will, it will serve as expiation for that which he was unable to pay of zakat."
Hadith Referenceسنن الدارقطني / كتاب الوصايا / 4288
Hadith Takhrij«أخرجه ابن ماجه فى ((سننه)) برقم: 2705، والدارقطني فى ((سننه)) برقم: 4288، والطبراني فى((الكبير)) برقم: 69»