I've seen unit tests that create a bunch of mocks and stubs and test that the stubs are getting called a certain number of times given the initial assumptions. At this point, the tests were like a copy of the original method, such that if you wanted to make a change, you would change the original method and then make updates to the test so that they'd sync up. Yes, this is how most testing <i>is</i>, but it felt different in that you weren't just updating expected output, you were updating multiple calls.<p>This was stupid. It looked and felt like nonsense and gave me no confidence that the tests would catch an error beforehand, they seemed to just catch that the code changed. (I'm curious if there's a name for this pattern of testing.) Bugs still made it to production, past these tests. This was a form of technical debt.<p>So if you have tests like these, if this habit of "unit" "testing" has somehow proliferated your code, I think you should kill that with fire and replace those tests with something sane.<p>Of course, there are certain central functions that I think need to get unit tested ten times over for every single possible edge case. I can't describe how you know what these functions are, but I'm sure some smart person out there can. Any 'utility' function that isn't strictly tied to an object or model or business logic (e.g. you made your own string concat method for some reason) needs to get tested outside of the context of integration tests.<p>Anyway, good luck. I've seen the internal debate of unit vs. integration tests more than once. When this has come up, it's because the org has allowed shitty testing habits to exist (in the form of technical debt, maybe like what I described above, or something else) in the first place, and instead of fixing the habits, "throwing the baby out with the bathwater" is the solution.<p>You're not paying down technical debt by getting rid of the tests, you're just creating a different kind by having integration tests that will not catch edge-cases, which will eventually come up later in time.