public class LatchCountDownAndCallRealMethodAnswer
extends java.lang.Object
implements org.mockito.stubbing.Answer<java.lang.Void>
Answer for void returning methods that calls the real method and counts down
a latch. Captures any exceptions thrown.| Constructor and Description |
|---|
LatchCountDownAndCallRealMethodAnswer(int count) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Void |
answer(org.mockito.invocation.InvocationOnMock invocation) |
java.util.Collection<java.lang.Exception> |
getExceptions()
Return the exceptions thrown.
|
java.util.concurrent.CountDownLatch |
getLatch() |
public LatchCountDownAndCallRealMethodAnswer(int count)
count - to set in a CountDownLatch.public java.lang.Void answer(org.mockito.invocation.InvocationOnMock invocation)
throws java.lang.Throwable
answer in interface org.mockito.stubbing.Answer<java.lang.Void>java.lang.Throwablepublic java.util.concurrent.CountDownLatch getLatch()
@Nullable public java.util.Collection<java.lang.Exception> getExceptions()