Class Returns

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

    public class Returns
    extends java.lang.Object
    implements Answer<java.lang.Object>, java.io.Serializable
    See Also:
    Serialized Form
    • 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
      • printReturnType

        public java.lang.String printReturnType()
      • getReturnType

        public java.lang.Class<?> getReturnType()
      • returnsNull

        public boolean returnsNull()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object