Generic interface to be used for configuring mock's answer. Answer specifies an action that is executed and a return value that is returned when you interact with the mock. Example of stubbing a mock with custom answer: when(mock.someMethod(anyString())).th
| 29 | * @param <T> the type to return. |
| 30 | */ |
| 31 | public interface Answer<T> { |
| 32 | /** |
| 33 | * @param invocation the invocation on the mock. |
| 34 | * |
| 35 | * @return the value to be returned |
| 36 | * |
| 37 | * @throws Throwable the throwable to be thrown |
| 38 | */ |
| 39 | T answer(InvocationOnMock invocation) throws Throwable; |
| 40 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…