To each of you We have ordained a code of law and a way of life. If Allah had willed, He would have made you one community, but His Will is to test you with what He has given you. So compete with one another in doing good. To Allah you will all return.
— Quran 5:48
God declared in the Quran that He would test us with difficulties and also with good fortunes. When we face difficulties, our test is whether we stay patient, we persevere and pray to God for help.