God made a covenant with Abraham, Isaac, and Jacob. God keeps his promises no matter if we cooperate or not. God’s plan will be accomplished. The only question is if we are going to be a part of his rescue plan.
Joseph could have given into despair and self pity at any point along the journey. When he was in the pit, sold to Ishmaelites, sold to Potiphar, thrown in prison, or forgotten for another 2 years by the cupbearer. In the lows, Joseph kept his eyes on God. Also, in the highs, he still kept his eyes on God. Had he not been focused on what God was doing, he could have exacted revenge on his brothers. Instead, he saw how God used him to further his plan. God is the author of His Story.