Initial tests
In the pharmaceutical business, a new drug candidate is first subjected to Phase I testing on a small number of healthy patients to test that the drug is safe for humans and works in the human body the way the models predict.
In your enterprise project, you similarly subject your code to initial, simple tests in order to ensure that each part of your code works the way you intend it to. These tests are often called unit tests because they test the smallest possible unit of work. Good tools for this are JUnit (http://junit.org) and TestNG (http://testng.org).
Tip
Keep testing
Your unit tests must be stored together with the application source code, so they can be run again after each change made to the application. If the requirements change, you should update the unit tests accordingly, and you should add additional unit tests when a new functionality is added.
Working with JUnit
JUnit is a unit testing framework for Java. Two things that you need to know about JUnit are as follows...