In school, they teach you a lesson and give you a test.

In life, you are given a test to teach you a lesson.