public static class GenericTestUtils.DelayAnswer extends Object implements org.mockito.stubbing.Answer<Object>
| Constructor and Description |
|---|
DelayAnswer(org.apache.log4j.Logger log) |
| Modifier and Type | Method and Description |
|---|---|
Object |
answer(org.mockito.invocation.InvocationOnMock invocation) |
int |
getFireCount() |
int |
getResultCount() |
Object |
getReturnValue()
After the call has gone through, return the call's return value,
or null in case it was void or an exception was thrown.
|
Throwable |
getThrown()
After the call has gone through, return any exception that
was thrown, or null if no exception was thrown.
|
protected Object |
passThrough(org.mockito.invocation.InvocationOnMock invocation) |
void |
proceed()
Tell the method to proceed.
|
void |
waitForCall()
Wait until the method is called.
|
void |
waitForResult()
After calling proceed(), this will wait until the call has
completed and a result has been returned to the caller.
|
public DelayAnswer(org.apache.log4j.Logger log)
public void waitForCall() throws InterruptedException
InterruptedExceptionpublic void proceed()
protected Object passThrough(org.mockito.invocation.InvocationOnMock invocation) throws Throwable
Throwablepublic void waitForResult() throws InterruptedException
InterruptedExceptionpublic Throwable getThrown()
public Object getReturnValue()
public int getFireCount()
public int getResultCount()
Copyright © 2007–2019 Cloudera. All rights reserved.