It is simple: use JUnit for unit testing.
I used to provide a collection of documents here, but now they are all provided by the JUnit distribution itself.
You can find JUnit through my source index page.