1. Joseph saw way beyond his immediate short-term circumstances.
2. Joseph took careful note of what God had revealed in the past.
3. Joseph knew that, although he was about to die, that was not the end of his story.
See:
http://evangelicalfocus.com/magazine/2886/Joseph_Faith_for_the_future