I think Joseph was an optimist. And that's no surprise. Because he'd had an optimal childhood as the loved and coddled favorite of his father.
Once that caravan of Ishmaelites got to Egypt and Joseph was installed in wealthy Potiphar's home, life continued along pretty much as it had up till the well incident -- his way. He was a good worker and soon had as much responsibility as he wanted. The golden touch -- that was his due. Until someone else noticed this natural-born prince.
I can only imagine the shivers of revulsion that ran up and down his spine once it came home to him how truly determined Potiphar's wife was to have him. The day she made her move, all he could think of was getting away. No matter that he ended up in prison! I don't imagine him having one second of regret that he didn't give in to her demands.
Maybe that first day he woke up in jail, he thought, I really am finished now. But of course he wasn't - just like we aren't when we emerge from a tight spot where we had no choice but to make the decision we made, but now we're in more trouble than we were at first.
Joseph found that with God, even that was a good spot to be - and so will we. His presence with us gives us reason to be an optimist any time and in any situation.
(If you want to read this story, it's in Genesis 39.)