Chapter 5. Testing the DAO Layer with Spring and JUnit
Everyone would agree that software testing should be a fundamental part of the development process. Thorough testing will ensure that the business requirements are met, the software works as expected, and that the defects are discovered before your client finds them. Although testing can never completely identify all the bugs, it is commonly believed that the earlier an issue is found, the cheaper it is to fix. It is far quicker to fix a NullPointerException
in a block of code during development than when the system has been deployed to your client's production server. When developing enterprise systems, it becomes even more critical to deliver high-quality code. The reputation of your company is at stake; identifying and fixing issues before delivery is an important reason to make testing a critical part of the development lifecycle.
There are many different types of testing, including but not limited to, unit testing...