Deuteronomy 8:2
1 You must keep carefully all these commandments I am giving you today so that you may live, increase in number, and go in and occupy the land that the Lord promised to your ancestors. 2 Remember the whole way by which he has brought you these 40 years through the wilderness so that he might, by humbling you, test you to see if you have it within you to keep his commandments or not. 3 So he humbled you by making you hungry and then feeding you with unfamiliar manna. He did this to teach you that humankind cannot live by bread alone, but also by everything that comes from the Lord’s mouth. 4 Your clothing did not wear out nor did your feet swell all these 40 years.
2 Chronicles 32:31
29 He built royal cities and owned a large number of sheep and cattle, for God gave him a huge amount of possessions. 30 Hezekiah dammed up the source of the waters of the Upper Gihon and directed them down to the west side of the City of David. Hezekiah succeeded in all that he did. 31 So when the envoys arrived from the Babylonian officials to visit him and inquire about the sign that occurred in the land, God left him alone to test him in order to know his true motives. 32 The rest of the events of Hezekiah’s reign, including his faithful deeds, are recorded in the vision of the prophet Isaiah son of Amoz, included in the Scroll of the Kings of Judah and Israel. 33 Hezekiah passed away and was buried on the ascent of the tombs of the descendants of David. All the people of Judah and the residents of Jerusalem buried him with great honor. His son Manasseh replaced him as king.
Notes and References
"... Deuteronomy 8:2 ... that YHWH your God led you in the wilderness these past forty years. Compare Amos 2:10, 'I led you in the wilderness for forty years,' and 29:5. in order to chastise you. Compare verses 3, 16, in the sense of discipline, as in verse 5. And compare Psalm 119:71, 'How good it is for me to have been chastised ('so that I learn your rules' and verse 75, 'I know your judgments are just, you chastised me rightly' ... to test you ... Compare 6:16 ... to know what was in your heart: whether you would keep his commandments or not. Compare 13:3; Judges 3:4; 2 Chronicles 32:31. The verse here is dependent on the manna episode in Exodus 16:4, 'That I may test them whether they will walk in my law or not.' The manna functioned as a test for Israel's disposition regarding God (compare the rebellious attitude in connection with the manna in Numbers 21:5) and as a test for the obedience of God's instructions. Compare Exodus 16:19-20, 26-29 for the violation of the divine commandments in connection with the gathering of the manna ..."
Weinfeld, Moshe Deuteronomy 1-11: A New Translation with Introduction and Commentary (p. 388) Doubleday, 1991