Proverbs 17 God raises up and puts down leaders and when a leader is in that position, God will refine them as if they were gold or silver through testing. The dictionary helps us understand this process: In metallurgy, the operation of refining large quantities of gold or silver by means of lead, in the vessel called a test. In this process, the extraneous matter is vitrified, scarified or destroyed, and the metal left pure.
The proverbs author uses this illustration as he writes about mankind. He notes that first of all the heart will yield to no force other than that of God. Dross in metal may be discovered and expurged by fire, but evil in the heart can be discovered and dealt with only by God and He alone places tests in our life to purge of us of sin so we may be pure for His kingdom work.