The christian is supposed to be happy in adversity because he follows the example of Christ and is filled with grace.
As Pauls puts it>
Colossians 1:24
Now I rejoice in my sufferings for your sake, and in my flesh I am filling up what is lacking in Christ’s afflictions for the sake of his body, that is, the church,
Philipians 3:10
…that I may know him and the power of his resurrection, and may share his sufferings, becoming like him in his death,
1 Corinthians 15:31
I die daily, I protest by your glory, brethren, which I have in Christ Jesus our Lord.
2 Corinthians 12 …so that I would not become arrogant, a thorn in the flesh was given to me, a messenger of Satan to trouble[h] me—so that I would not become arrogant.[i] 8 I asked the Lord three times about this, that it would depart from me. 9 But[j] he said to me, “My grace is enough[k] for you, for my[l] power is made perfect[m] in weakness.” So then, I will boast most gladly[n] about my weaknesses, so that the power of Christ may reside in[o] me. 10 Therefore I am content with[p] weaknesses, with insults, with troubles, with persecutions and difficulties[q] for the sake of Christ, for whenever I am weak, then I am strong.