One of techniques to ensure that software is properly and thoroughly tested is to get code coverage information and find which blocks of code weren’t executed at all.
There is a number of code coverage tools for Java applications. One of them, free and mature is Emma ( http://emma.sourceforge.net/ ) which is one used by NetBeans code coverage plugin.
Installing plugin
To install plugin, select Tools -> Plugins and choose “Code Coverage” in the list of available plugins:
