org.mockito.internal.stubbing
Class Returns

java.lang.Object
  extended by org.mockito.internal.stubbing.Returns
All Implemented Interfaces:
Answer<java.lang.Object>

public class Returns
extends java.lang.Object
implements Answer<java.lang.Object>


Constructor Summary
Returns(java.lang.Object value)
           
 
Method Summary
 java.lang.Object answer(InvocationOnMock invocation)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Returns

public Returns(java.lang.Object value)
Method Detail

answer

public java.lang.Object answer(InvocationOnMock invocation)
                        throws java.lang.Throwable
Specified by:
answer in interface Answer<java.lang.Object>
Parameters:
invocation - the invocation on the mock.
Returns:
the value to be returned
Throws:
java.lang.Throwable - the throwable to be thrown