Joseph, as a slave, was eventually taken to Egypt, where he was a servant in a very powerful military leader's house. At this point, Joseph could have easily had this attitude: "Why should I serve God? Look at the family He put me in! I was trying to do the right thing, and look what He allowed to happen to me!" He could have come up with many excuses to shake his fist in God's face.
The life of Joseph is too long and detailed to capture in this short blog post. But here is something for you to consider. When you look at the end of Joseph's troubled life, you find that Joseph was greatly used by God. The beginning of his life was pretty horrible; but the end of his life was amazing! If Joseph had turned his back on God when he was a young man, he would have never seen the amazing blessings that God had for him later in his life.
You may come from a messed up family. Maybe you have half brothers and sisters, a stepmom, or a stepdad. Your home may not be a place of peace and comfort. Your home may be a place of screaming and fighting. Maybe you are angry at God for allowing you to be in that situation. Maybe your parents aren't divorced, but they don't get along. Let me encourage you to keep your heart right with God. Things may be messed up right now; but if you will stay close to your Heavenly Father, you will be amazed at the way He will use your life. Remember, your not the only one to be in a messed up home situation. Look at Josiah and Joseph.