I like to know what mock objects are in Java. Why do we create them and what are their uses?
Mock objects let you simulate and verify real objects, without actually running the real code in those objects. You can set up a mock to return specific results on method calls, you can verify that a method was or wasn't called, and other cool stuff.
Mockito is a very simple and straightforward Java mock object library.