add invariant test to 'writing tests' section (#32)