What is the primary purpose of using Mockito in unit testing?

  • To create mock objects
  • To execute SQL queries
  • To generate code coverage reports
  • To write test cases
Mockito is primarily used to create mock objects, which simulate the behavior of real objects in a controlled way. Mock objects are helpful for isolating the code being tested and verifying interactions between objects.
Add your answer
Loading...

Leave a comment

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