In Mockito, the _____ method can be used to stub a return value for a method call.

  • mock
  • spy
  • verify
  • when
In Mockito, the when method is used to stub a return value for a method call. This allows you to define the behavior of a mocked object when a specific method is called during testing.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *