Allah (SWT) had granted immense bounties to Prophet Job / Ayyub (AS) such that it has been reported that he possessed five hundred pairs of bulls for ploughing his fields and hundreds of workers, who used to cultivate his farms. His cargo-carrying camels were three thousand in number while his sheep totalled seven thousand.
In addition to this, Allah (SWT) had also granted him good health and numerous children. On his part, Prophet Job (AS) perpetually praised and thanked his Lord, and when faced with two acts of obedience, he would always choose the more difficult of the two.
But then, he became the object of Divine trials - not for having committed any sin but rather for raising his rank and status - such that Allah (SWT) took back all the bounties that He had given him and afflicted his body with an incurable disease.
However, despite the severity of the adversity, when Prophet Job (AS) did not abandoned thanking, praising and remembering Allah (SWT), the Satan got into the act. He began whispering into his wife's mind as a result of which she started to complain of the hard times that had befallen them and would moan: "Everyone has deserted us and we do not possess anything."
Prophet Job (AS) said: "For eighty years we had been receiving the bounties of Allah (SWT) and so we should not complain for seven years of hardships but instead continue to remember Him in all circumstances!"
But his wife continued to complain and protest, and persistently placed before him irrational ideas till eventually, enraged, he hollered: "Go away from me such that I do not set my eyes upon you ever again."
When his wife had left him, the prophet Job (AS) found himself alone and without a caretaker; going into prostration, he began praying to his Lord and communicating with Him. On this occasion Allah (SWT) answered the prayers of His servant, who had continued to praise and thank Him, and once again granted him all the bounties!
Meanwhile his wife thought to herself: "Though he has driven me away, it is inappropriate for me to leave him alone. He has none to look after him and he may perish out of hunger." With this in mind, she returned to the place where she had left him but found him missing, while in his place, sat a youth. As she began to weep, the youth asked her: "Why do you weep?" She replied: I had left my old husband here but I do not see him anymore. The youth said: "If you were to see him, would you recognize him?" She said: "Yes."
Having answered him, she then looked at him carefully and realised that he possessed a great resemblance to her husband. The youth then said to her: "I am the same Ayyub." (Anecdotes for Reflection, Vol 3, Dhikr)