Romans 5:2

Not only that, but we find joy in our sufferings, knowing that suffering produces endurance.