<p>One of the purposes of writing tests is to
<a href="http://en.wikipedia.org/wiki/Unit_testing#Documentation">provide living documentation of application’s code</a>.
Tests provide real examples of how a certain class or function is supposed to be
used. Tests could also document the exact dependencies of the tested code…</p>

Read more at the source