Genesis 40:4
And the captain put them in Joseph's care, and he did what was needed for them; and they were kept in prison for some time.
Genesis 37:36
And in Egypt the men of Midian gave him for a price to Potiphar, a captain of high position in Pharaoh's house.
Genesis 39:1
Now Joseph was taken down to Egypt; and Potiphar the Egyptian, a captain of high position in Pharaoh's house, got him for a price from the Ishmaelites who had taken him there.
Genesis 39:21-23
But the Lord was with Joseph, and was good to him, and made the keeper of the prison his friend.
Psalm 37:5
Put your life in the hands of the Lord; have faith in him and he will do it.