Mockito 3 Additional Answers

Mockito provides an Answere interface which has capability to preconfigured the Mockito answres, in addition to that, Mockito provides an AdditionalAnswers interface which provides a factory methods for answers. some of the methods provided by AdditionalAnswers are.

  • delegatesTo
  • returnsArgAt
  • returnsElementsOf
  • returnsFirstArg
  • returnsLastArg
  • returnsSecondArg

 

follow us on