Job 2:8
This can be shown from gardens also, for gardens are spread with manure so that they may come to magnificence and beauty and bring forth good and sweet fruit; likewise our soul, coming upon trials, grows more to righteousness and all good character. The same thing is said in the Gospels about the fig tree that did not bear fruit, about which the gardener asked that he might manure it.
Therefore Job sat on the dunghill during his trials, and sitting there waited for a word from God. Patience under trials is a very great good. For despising all worldly things he sat on the dunghill as if in the... emperor’s palace.
Source: De Cibis, Chapter 5