Unit test is by definition a test designed to make sure that a certain
object/module works properly.

See also: [http://www.c2.com/cgi/wiki?UnitTests]

To do [unit testing] in [Java], get the [JUnit test harness|JUnitTips].  See how an example on [how to construct a JUnit testcase].