Another interpretation (of Psalms 11:5): "The Lord tests the righteous." Rabbi Isaac said: With what does He test the righteous? With the pasture. David was tested with the pasture, as it is said, "From following the nursing ewes He brought him" (Psalms 78:70-71). Amos was tested with the pasture, "And the Lord took me from following the flock" (Amos 7:15). Moses too was tested with the pasture, as it is said, "And Moses was shepherding..." (Exodus 3:1).
How God Tested Moses, David, and Amos at the Pasture
Midrash Tanchuma Buber, Shemot 10:2
ד"א ה' צדיק יבחן, אמר ר' יצחק במה הוא בוחן הצדיקים במרעה, דוד נבחן במרעה, שנאמר מאחר עלות הביאו לרעות וגו' (תהלים עח ע), עמוס נבחן במרעה, ויקחני ה' מאחרי הצאן (עמוס ז טו) אף משה נבחן במרעה, שנאמר ומשה היה רועה וגו'.