Psalm 105:18–19 “They afflicted his feet with fetters, He himself was laid in irons; Until the time that his word came to pass, The word of the Lord tested him.”
Genesis 40:8, Then they said to him, “We have had a dream and there is no one to interpret it.” Then Joseph said to them, “Do not interpretations belong to God? Tell it to me, please.”
Genesis 40:20-22, “Thus it came about on the third day, which was Pharaoh’s birthday, that he made a feast for all his servants; and he lifted up the head of the chief cupbearer and the head of the chief baker among his servants. He restored the chief cupbearer to his office, and he put the cup into Pharaoh’s hand; but he hanged the chief baker, just as Joseph had interpreted to them.”
Genesis 40:14-15, “Only keep me in mind when it goes well with you, and please do me a kindness by mentioning me to Pharaoh and get me out of this house.
“For I was in fact kidnapped from the land of the Hebrews, and even here I have done nothing that they should have put me into the dungeon.”
In support of his appeal, Joseph explained his plight in a rare moment of self-defense (v. 15). The construction is emphatic: “I was surely stolen [gunnōb gunnabtî] from the land of the Hebrews,” referring to his being sold by his brothers.
Then he added that he had done nothing to deserve prison now (lōʾ-ʾāśîtî meʿ ûmâ being literally true), for he was falsely accused. His protesting of his innocence adds to the idea that God was testing him, for he was suffering without a cause.