with Settings
Allows mock creation with additional mock settings. See MockSettings.
Parameters
Specifies extra interfaces the mock should implement.
Specifies mock name. Naming mocks can be helpful for debugging - the name is used in all verification errors.
Specifies the instance to spy on. Makes sense only for spies/partial mocks.
Specifies default answers to interactions.
Configures the mock to be serializable.
Configures the mock to be serializable with a specific serializable mode.
Enables real-time logging of method invocations on this mock.
Registers a listener for method invocations on this mock. The listener is notified every time a method on this mock is called.
A stub-only mock does not record method invocations, thus saving memory but disallowing verification of invocations.
Mockito attempts to use constructor when creating instance of the mock.
Makes it possible to mock non-static inner classes in conjunction with useConstructor.
Lenient mocks bypass "strict stubbing" validation.