Class ReturnsDeepStubs.DeeplyStubbedAnswer

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

    private static class ReturnsDeepStubs.DeeplyStubbedAnswer
    extends java.lang.Object
    implements Answer<java.lang.Object>, java.io.Serializable
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Object mock  
    • Constructor Summary

      Constructors 
      Constructor Description
      DeeplyStubbedAnswer​(java.lang.Object mock)  
    • 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

      • mock

        private final java.lang.Object mock
    • Constructor Detail

      • DeeplyStubbedAnswer

        DeeplyStubbedAnswer​(java.lang.Object mock)
    • 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