There, Yahweh ◄refined Joseph’s character/tested Joseph to see if Joseph would continue to trust him►, until what Joseph predicted would happen ◄came true/happened►.