[Andrew Fawcett] Writing true Apex unit tests that are quite granular can be hard in Apex, especially when the application gets more complex, as there is limited mocking support, meaning you have to create all your test data and move it through stages in its life cycle (by calling other methods) to get to the logic your unit test needs to test. Which of course is in itself a valid test approach definitely needed, this blog is certainly not aiming to detract from those. But these are more of an integration or functional test. Wikipedia has this to say about unit tests … – Learn more at Andy In The Cloud