Joseph in the Bible in Genesis 42-45 exercised a strong discernment and acted wisely when he met with his brothers who betrayed and sold him off to strangers many years ago. He placed his emotions under strict control and waited until it was the right time to express them publicly. Though he loved his brothers, he exercised restraint and acted wisely so that they also could learn the lesson they needed to learn because of their past misdeeds against him. So he meticulously planned the incidents to touch their consciences and at the same time expressed his love at the right time. Likewise, Solomon also prayed for wisdom when God appeared to him in a dream, and immediately God gave him problems to solve using his God-given wisdom.
In Gibeon Jehovah appeared to Solomon in a dream at night; and God said, Ask what I should give you.
And Solomon said, You have shown great lovingkindness to Your servant David my father, because he walked before You in truth and righteousness and in uprightness of heart with You; and You have kept for him this great lovingkindness and have given him a son to sit upon his throne, as it is this day.
And now, O Jehovah my God, You have made Your servant king in the place of David my father, though I am a little child; I do not know how to go out or come in.
And Your servant is in the midst of Your people, whom You have chosen, a vast people that cannot be numbered or counted for multitude.
Give therefore to Your servant an understanding heart to judge Your people and to discern between good and evil. For who is able to judge this great people of Yours?
And this word seemed good in the sight of the Lord, that Solomon had asked for this matter.
And God said to him, Because you have asked for this matter and have not asked for long life for yourself and have not asked for riches for yourself and have not asked for the life of your enemies, but have asked for discernment for yourself to understand justice;
I now do according to your words. I now give you a heart of wisdom and understanding, so that there has been no one like you before you, nor will one rise up after you like you. 1 Kings 3:5-12