Ibrahim al-Sulami narrates from his father, from his grandfather (may Allah be pleased with him), who had the companionship of the beloved Prophet (peace and blessings be upon him). He said: I heard the Messenger of Allah (peace and blessings be upon him), he (peace and blessings be upon him) was saying: "Indeed, a high station and rank is written for a servant by Allah Almighty, but the person does not reach it through his deeds, so Allah Almighty tests that servant in his body, his wealth or his children." Ibn Nufayl added the words: "Then he is patient with that." Both agree on this: "Until Allah Almighty brings that servant to the station which had already been decreed for him by Allah Almighty."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 6545