Sirach 2:1
Ben Sira, Ecclesiasticus1 My child, when you come to serve the Lord, prepare yourself for testing. 2 Set your heart right and be steadfast, and do not be impetuous in time of calamity. 3 Cling to him and do not depart, so that your last days may be prosperous. 4 Accept whatever befalls you, and in times of humiliation be patient. 5 For gold is tested in the fire, and those found acceptable, in the furnace of humiliation.
James 1:3
1 From James, a slave of God and the Lord Jesus Christ, to the twelve tribes dispersed abroad. Greetings! 2 My brothers and sisters, consider it nothing but joy when you fall into all sorts of trials, 3 because you know that the testing of your faith produces endurance. 4 And let endurance have its perfect effect, so that you will be perfect and complete, not deficient in anything. 5 But if anyone is deficient in wisdom, he should ask God, who gives to all generously and without reprimand, and it will be given to him.
Notes and References
"... James 1:3 ... The notion is plainly that of testing. See the same phrase in 1 Peter 1:7. Thus James, as Paul, regards faith as “the very foundation of religion” (Mayor). The verb from which the adjective is derived is common enough for testing a yoke of oxen (Luke 14:19), the spirits (1 John 4:1), work by fire (1 Cor. 3:13), genuineness of love (2 Cor. 8:8), all things (1 Thess. 5:21). Peter (1 Peter 1:7) explains the adjective by the verb (tested by fire). Compare Sirach 2:5: “For gold is tried in the fire, and acceptable men in the furnace of adversity.” One is reminded of the Sermon on the Mount. “Ye shall know them by their fruits” (Matt. 7:16). ..."
Robertson, A. T. Studies in the Epistle of James (p. 37) Broadman Press, 1959