"Joseph's gentleness and fidelity won the heart of the chief captain, who came to regard him as a son rather than a slave. The youth was brought in contact with men of rank and learning, and he acquired a knowledge of science, of languages, and of affairs—an education needful to the future prime minister of Egypt. PP 217.1"
"Seest thou a man diligent in his business? he shall stand before kings; he shall not stand before mean men."
Both passages connect diligence and skill with advancement and association with influential people. Joseph's acquisition of knowledge and contact with men of rank parallels the idea of standing before kings due to diligence.
Joseph's answer reveals the power of religious principle. He would not betray the confidence of his master on earth, and, whatever the consequences, he would be true to his Master in heaven. Under the inspecting eye of God and holy angels many take liberties of which they would not be guilty in the presence of their fellow men, but Joseph's first thought was of God. “How ... can I do this great wickedness, and sin against God?” he said. PP 217.3 If we were to cherish an habitual impression that God sees and hears all that we do and say and keeps a faithful record of our words and actions, and that we must meet it all, we would fear to sin. Let the young ever remember that wherever they are, and whatever they do, they are in the presence of God. No part of our conduct escapes observation. We cannot hide our ways from the Most High. Human laws, though sometimes severe, are often transgressed without detection, and hence with impunity. But not so with the law of God. The deepest midnight …
"There is none greater in this house than I; neither hath he kept back any thing from me but thee, because thou art his wife: how then can I do this great wickedness, and sin against God?"
The EGW passage directly quotes and expands upon Genesis 39:9, using it as a foundation for her discussion of religious principle and the omnipresence of God.