This lesson demonstrates a simple example of using Mockito.mock to produce a stub which can be used instead of the real database dependency.
In this lesson you will learn:
Creating a mock object using Mockito.mock method
Recommendation for naming mock objects
Writing a unit test which expects an exception to be thrown
Brief summary of anyString() matcher
Description of default behavior of objects created using Mockito
Controlling how the mock behaves using the Mockito.when method