This article describes how to write unit test cases for Java based on Mockito and supplemented by PowerMock.
This article summarizes several Java unit testing techniques.