| Exception | Description |
|---|---|
| CannotStubVoidMethodWithReturnValue | |
| CannotVerifyStubOnlyMock | |
| FriendlyReminderException | |
| InjectMocksException |
Thrown when creation of test subject annotated with InjectMocks fails.
|
| InvalidUseOfMatchersException | |
| MissingMethodInvocationException | |
| MockitoConfigurationException | |
| NotAMockException | |
| NullInsteadOfMockException | |
| PotentialStubbingProblem |
PotentialStubbingProblem improves productivity by failing the test early when the user
misconfigures mock's stubbing. |
| RedundantListenerException |
Reported when instance of
MockitoListener
is being added to Mockito (see MockitoFramework)
and there is already a listener with this implementation type registered. |
| UnfinishedMockingSessionException |
This exception prevents the user from forgetting to use
MockitoSession.finishMocking(). |
| UnfinishedStubbingException | |
| UnfinishedVerificationException | |
| UnnecessaryStubbingException |
This exception indicates presence of unused stubbings.
|
| WrongTypeOfReturnValue |