How then can I do this great wickedness, and sin against God? Genesis 39:9. FH 265.1
When trial came, when the arts of woman were exercised to draw him into iniquity, Joseph preserved his integrity. Fair words and guileful entreaties did not cause him to swerve one hair from the right. All fell on ears that heard not. The law of the Lord garrisoned his soul. He said to the bold enchantress, “How then can I do this great wickedness, and sin against God?” FH 265.2
The woman signally failed to lead Joseph into sin. Satan was defeated. And then Joseph found that the lips which could praise could also lie. The wife of Potiphar revenged herself upon him by her accusations against him. Because Joseph would not sin against one who had trusted him, he was deprived of the honor which, through the grace of God, he had justly earned and which had brought him into relation with the great men of Egypt. FH 265.3
This sudden humiliation from the position of a trusted, honored servant to that of a condemned criminal would have overwhelmed him had not the hand of the Lord upheld him. But his confidence in God was unshaken. The love of God kept his soul in perfect peace. Heaven was very near the fertile valley of Egypt, for there was a youth who kept the ways of the Lord. The presence of Jesus was with him in prison, instructing, strengthening, and sustaining his mind and soul, that the light of heaven might shine forth. FH 265.4
Joseph had been tried by parental fondness and partiality; by the enmity, envy, and hatred of his brothers; by the esteem and confidence of his master; and by his high position of honor. He was tried by the seduction of woman's charms, by the flattery of her lips and her lawless love. But the steadfast virtue of Joseph would not permit him to listen to the voice of the tempter. The law of the Lord was his delight, and he would not depart from its precepts.... FH 265.5
Even while in prison, Joseph was allowed to be at liberty and had opportunity to give the light to his fellow prisoners. This prison was to him an educating school.... He saw in every phase of its management the superiority of the law of God, and by his experience and observation was learning to be just and merciful, thus representing the character of God. FH 265.6
Power was to be put into the hands of Joseph, and through him God was to be revealed as the ruler of the heavens and the earth. But he was to be trained in adversity—the school in which God designs that His children shall learn.—Youth's Instructor, March 11, 1897. FH 265.7