“I don’t need to test that” is a code smell

If I think of testing some aspect of my code’s behaviour, and I get the impulse “oh that’s so simple, writing a test for that behaviour is a complete waste of time”, and I then resist that impulse and write a test for it anyway, I’m guaranteed to find a bug.

This happens every single time. The “oh that’s so simple” impulse which would have stopped me testing the code is the same impulse that stopped me paying attention to it and noticing the bugs.