Class ReturnsMocks

  • All Implemented Interfaces:
    java.io.Serializable, Answer<java.lang.Object>

    public class ReturnsMocks
    extends java.lang.Object
    implements Answer<java.lang.Object>, java.io.Serializable
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ReturnsMocks()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object answer​(InvocationOnMock invocation)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • delegate

        private final Answer<java.lang.Object> delegate
    • Constructor Detail

      • ReturnsMocks

        public ReturnsMocks()
    • 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