Our beloved Prophet Muhammad ﷺ would at times not have food for many days and even when he would have had food to eat, he would eat moderately. Regardless of the situation and circumstances, he would thank Allah SWT and show gratitude.
In this Hadith, the Prophet Muhammad ﷺ compares the reward of two people who have opposite circumstances. A person who is able to eat, or in other words is resourceful, is tested by Allah SWT to see if he is grateful. On the other hand a person who fasts or is destitute and is unable to afford food, is tested to see if he is patient.
This Hadith shows us that Allah SWT in all His wisdom, tests in different circumstances differently. The fact is that everyone is tested no matter how affluent, happy or content they appear outwardly. Indeed Allah SWT is the most Just.
May Allah SWT make us among those people who are always always thankful to Him for His countless blessings regardless of our circumstances.