The Lord was with Joseph, and he was a successful man; and he was in the house of his master the Egyptian. Genesis 39:2. FH 264.1
It was God's design that through Joseph, Bible religion should be introduced among the Egyptians. This faithful witness was to represent Christ in the court of kings. Through dreams God communicated with Joseph in his youth, giving him an intimation of the high position he would be called to fill. The brothers of Joseph, to prevent the fulfillment of his dreams, sold him as a slave, but their cruel act resulted in bringing about the very thing the dreams had foretold. FH 264.2
Those who seek to turn aside the purpose of God and oppose His will may appear for a time to prosper; but God is at work to fulfill His own purposes, and He will make manifest who is the ruler of the heavens and the earth. FH 264.3
Joseph regarded his being sold into Egypt as the greatest calamity that could have befallen him, but he saw the necessity of trusting in God as he had never done when protected by his father's love. Joseph brought God with him into Egypt, and the fact was made apparent by his cheerful demeanor amid his sorrow.... It is God's purpose that those who love and honor His name shall be honored also themselves, and that the glory given to God through them shall be reflected upon themselves. FH 264.4
Joseph's character did not change when he was exalted to a position of trust. He was brought where his virtue would shine in distinct light in good works. The blessing of God rested upon him in the house and in the field. All the responsibilities of Potiphar's house were placed upon him. And in all this he manifested steadfast integrity, for he loved and feared God. FH 264.5
Placed as he was in the society of learned men, he gained a knowledge of science and language. This was his training school, that in early manhood he might become qualified to be prime minister of Egypt. He learned those things that would be essential in his future position of trust. He gathered all the wisdom and knowledge and tact that his opportunities presented, and these were not few. Yet his heart was steadfast with God. Human knowledge and divine wisdom were combined, that he should be a shining light, reflecting the bright beams of the Sun of Righteousness amid the gross darkness of heathenism. Here the religion of the Hebrew was seen to be of an altogether different character from the religious rites and customs of the idolatrous Egyptians.—Youth's Instructor, March 11, 1897. FH 264.6