Class ArgumentAnswer<T>

  • All Implemented Interfaces:
    org.mockito.stubbing.Answer<T>

    public class ArgumentAnswer<T>
    extends Object
    implements org.mockito.stubbing.Answer<T>
    Identity function on one of the arguments
    Author:
    Lindhauer
    • Field Detail

      • argIndex

        protected int argIndex
    • Constructor Detail

      • ArgumentAnswer

        public ArgumentAnswer​(int argIndex)
    • Method Detail

      • answer

        public T answer​(org.mockito.invocation.InvocationOnMock invocation)
                 throws Throwable
        Specified by:
        answer in interface org.mockito.stubbing.Answer<T>
        Throws:
        Throwable