Using Mockito to Unit Test Java Applications

Steve Neal Development, Java Programming, Tool support 23 Comments

If you’ve spent any time writing unit tests then you’ll know that it’s not always straight-forward. Certain things are inherently hard to test. In this post I’ll show you the basic principles of creating mock objects with a little help from the Mockito mocking tool. One common problem faced when unit testing is how to test one object when it …