God Used Joseph’s Trials to Set the Stage for the Exodus