Yosef Hatzadik / Joseph was the ruler of Mitzrayim / Egypt. His Brothers came to purchase grain – because of the famine in Canaaan (Israel). They came before him. He accuses them to be spies.
They really came to search for their long lost brother – Yosef. They didn’t recognize that the ruler before them was actually Yosef. Yosef wanted to test whether the brothers repented for having sold him many years before. He thus took their brother – Binyamin to be a slave – to see if the brothers would defend him.
After he reveals himself to the brothers and the family is reunited. He sends a letter to his father Yaakov that says he is alive and also is the ruler in Egypt. This letter was found in Rome. The letter found is called “Iggeret Yosef Hatzadik”.
Among things that are mentioned is how the snakes and scorpions befriended him, how the Yishmaelim / people from Yishmael Treated him cruely, how he was sent in the dungeon because of a crime he didn’t commit.
Here is the file: