But the Lord was with Joseph and showed him mercy,
and He gave him grace in the sight of the chief prison keeper.
So the chief keeper of the prison put under Joseph’s authority both the prison and all the prisoners,
and whatever they did there.
The chief keeper of the prison did not look into anything under Joseph’s authority,
because the Lord was with him; and whatever he did, the Lord made it prosper.
(Gen 39:21-23)

You notice how even when Joseph encountered troubles he had no sense of distress;
instead, the creative wisdom of God transformed all his distress.
Just as a pearl reveals its peculiar beauty even if someone buries it in the mire,
so too virtue, wherever you cast it, reveals its characteristic power,
be it in servitude, in prison, in distress, or in prosperity.
St. John Chrysostom