- "Write tests. Not too many. Mostly integration."
- Integration tests strike a great balance on the trade-offs between confidence and speed/expense. This is why it's advisable to spend most (not all, mind you) of your effort there.
- biggest thing you can do to write more integration tests is to stop mocking so much stuff
- When you mock something you're removing all confidence in the integration between what you're testing and what's being mocked.
Instead to find where org.w3c.dom comes from I've been using this script:
mvn dependency:copy-dependencies -DincludeScope=test -DoutputDirectory=deps
for i in deps/*.jar; do if unzip -l $i| grep -q org.w3c.dom; then echo $i; fi ; done