Consider it all joy, my brothers, when you encounter various trials, for you know that the testing of your faith produces perseverance.  And let perseverance be perfect, so that you may be perfect and complete, lacking in nothing.

But if any of you lacks wisdom, he should ask God who gives to all generously and ungrudgingly, and he will be given it.  But he should ask in faith, not doubting, for the one who doubts is like a wave of the sea that is driven and tossed about by the wind.

James 1:2-6