Joseph is brought down to Egypt as a slave, despite what he is destined to become later, nevertheless he prospers and becomes the key servant to his master, Potiphar. His bearing is such that he becomes a favourite.
Though we may be hated for our faith, yet if we are hard workers who serve to the best of our ability, we will usually earn the respect of men. What we may lack in skill can be made up for by diligence and conscientiousness. Joseph got all these virtues from the Lord.
The believer serves with good will and aims to please his earthly master. He does not complain even when circumstances are unjust, and certainly Joseph had been treated unjustly. But he makes the best of his circumstances and seeks a testimony to God even as a slave.
Joseph is far from the restraining influence of his father now. Now he can behave freely if he wants, but instead he still keeps on with his devotion and piety. The one who truly obeys God does not obey because of what men see, nor because he learns what is right from society. He obeys God from the heart whether or not those around him commend his behaviour. He is answerable to God and continues to obey wherever the Lord takes him in life.