Joseph had a dream that the sun, moon, and eleven stars would bow down to him, these represented his father, Israel, his mother, and his eleven brothers. No one believed him, not even his father. The many obstacles meant to destroy Joseph and his dream only brought him to the fulfillment of it. His jealous brother's sold him to slave traders, who in turn sold him to Potiphar, the captain of the guard for Pharaoh, the ruler of Egypt, his brothers told their father that he had been killed by wild animals. In Egypt he was promoted to Potiphar's personal attendant, but Potiphar's wife falsely accused him of trying to rape her and he was put in prison, there he was put in charge of the other prisoners. Pharaoh's chief cup-bearer and chief baker had also been put into prison and Joseph interpreted dreams each one had, the cup-bearer's dream revealed he would be restored to his former position, the baker's dream revealed he would be executed. The cup-bearer was released and restored to his former position as Joseph had said, but he forgot Joseph for two years until Pharaoh had two dreams no one could interpret. The cup-bearer then told Pharaoh how Joseph had interpreted his dream about being restored to his position. Pharaoh summoned him, and Joseph said with God's help he would tell him what the dreams meant, no one else had been able to do this. God revealed the interpretations to Joseph, which was that their would be seven good years and seven years of famine throughout Egypt and the entire region, he suggested Pharaoh put an intelligent and wise man in charge and Pharaoh decided Joseph was that man. Joseph became second in command in Egypt. His family was forced to come to him for food during the years of famine, and later, after testing them he revealed to them that he was Joseph, and eventually gave his family the choice land of Goshen. Joseph kept his position as second in command to Pharaoh for the remainder of his life, Egypt was his promised land, his dream had been fulfilled. He did, however, request when they left Egypt for their own promised land, that they take his bones with them.
Eventually, after his generation had died off, Joseph was forgotten, and the Israelites were feared, the new Pharaoh made slaves of them. The land that been their salvation became their prison. Egypt was not the land God promised the children of Israel, and God groomed Moses to lead them to their promised land.