If you are planning to test your program then use the JUNIT. Junit is industry standard Unit testing tool for java programmers.
Junit is used in all the software project to test the application. Developers uses Junit to test their application.
JUnit is a free, open source Java framework that makes unit testing easier and more effective.
JUnit is an open source, regression-testing framework for Java that developers can use to write unit tests as they develop systems. The framework helps to establish a close relationship between testing and development.
Here is the tutorial on Junit http://www.roseindia.net/junit/