Write the tests first to drive what needs to be written.
Tests prove that what you wrote works.
Tests also protect code against the unintentional introduction of errors in the future.
Tests also help us design the code and its interface.
Tests also explain the code.
Remember - tests reveal assumptions and verify them at the same time.