In Genesis 41 we read Joseph was in prison for 2 years after Pharaoh’s cupbearer was restored to his position and the chief baker hanged. Pharaoh had his two famous dreams about the cows and the corn, and Joseph was called upon to interpret them.
Joseph hadn’t lost his faith in those 2 years; he attributes the interpretation of the dream to God, “God has shown Pharaoh what he is about to do”. In a land that knew very little about the God of Abraham, Joseph is not afraid to speak openly of his faith. So Joseph is elevated to second in charge, and the dreams come to pass as Joseph had said. Even in this elevated position Joseph doesn’t forget God, naming his 2 sons after the blessings provided by God.
In Matthew 27 we read of another faithful Joseph, who risked his life begging for the body of Jesus, prepared the body and placed it in his own tomb. Both Josephs demonstrated their faith despite the personal risks, an example to encourage us and remind us to show our faith in action.