> pouring cement around your house of cards
I've observed that way too much unit testing ends up having this effect, but it doesn't have to. There are two extremes with unit testing: "no unit testing at all" and "mock everything", and both are wrong for different reasons. I have yet to see a codebase with no unit testing which doesn't have problems (in production that impact real users) that could easily have been caught by a simple unit test. The mock-everything approach ensures that you can never make a change to the code, though. A simple middle-ground is to mock everything that's actually external to the system being tested: databases, file systems, remote services. Otherwise, use the actual code: if a function calls another function, internal to the system being tested, just call that function (but make sure it has a unit test of its own).