The worst has happened? Well, then, the best is yet to come!
The plans of God for his children are of good, and not evil; to give us an expected end. The expected end is simply glorious. So, until it ends in glory, it is not the end.
Joseph's destiny was glorious, therefore, it was contended, and it seemed to have been thwarted. However, he was catapulted into a training and preparatory period. His demotion for a period, led to eternal elevation.
So, be still and know He's God! Make the best of every situation...