When we are the Lord’s child we can expect to be chastened. Just as an earthly father disciplines the child he loves so does our heavenly father. So if we find our self in a trial, know it can be used for good. We grow and mature from our discipline.
Believers may be chastened of the Lord, but will not be condemned with the world. By their union with Christ through faith, they are thus secured. What is the principle of their walk; the flesh or the Spirit, the old or the new nature, corruption or grace? For which of these do we make provision, by which are we governed? The unrenewed will is unable to keep any commandment fully. And the law, besides outward duties, requires inward obedience. ~ Matthew Henry Commentary
And we know that in all things God works for the good of those who love him, who have been called according to his purpose.