1. If you are going to assert these things, don't do it in the middle of the method - do it in a place that makes sense (start of the method).
2. One of the members of my team likes to make assertions about parameters that aren't actually valid but just sound like they are, for example, wrapping the entire code in a method with an int id parameter with a
if (id > 0) {
...
}
block so that the method silently does nothing if you pass in a negative number. Except of course that there's nothing in our domain model to say that IDs can't wrap zero into negative space or that this isn't a valid scenario.So in other words, having a bunch of unnecessary assertions that spring up in seemingly random places makes your code hard to test.