Boilerplate code is not a thing. Most "boilerplate" code is already covered in a library or package, and it should be used there. Otherwise, there are situational edge cases to be covered.
And unit test code is not boilerplate either. The point of unit tests aren't just to verify, but to explain problems when a failure happens. Unit tests without this are test theater.
@madopal We have recently discovered that AI is great at generating trivial unit tests that pass because they don't test anything. But you do get lots of tests, so that's nice.