Invokes the expectation: records that the invocation has occurred and fakes some behaviour in response.
|invocation ||The invocation to record and fake. |
- A result that is eventually returned from the method call that caused the invocation.
|Throwable ||An exception that is eventually thrown from the method call that caused the invocation. |
|IllegalStateException ||The expectation has been invoked with a method that it doesn't match or the faked behaviour has been set up incorrectly. For example, IllegalStateException is thrown when trying to return a value or throw a checked exception that is incompatible with the return type of the method being mocked |
Definition at line 111 of file InvocationExpectation.java.
final Object result = action.invoke(invocation);