org.mockito.stubbing.answers

Class ReturnsElementsOf

    • Constructor Summary

      Constructors 
      Constructor and Description
      ReturnsElementsOf(java.util.Collection elements) 
    • Method Summary

      Methods 
      Modifier and Type Method and 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
    • Constructor Detail

      • ReturnsElementsOf

        public ReturnsElementsOf(java.util.Collection elements)
    • Method Detail

      • answer

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