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.
Loading...
Related Quiz
- In connection pooling, what does the term "Maximum Pool Size" refer to?
- What is the purpose of password encoding in Spring Security?
- In a Spring Boot application, the HTTP request body can be deserialized using the _____ annotation.
- Which feature of Spring Boot simplifies the inclusion of external libraries or modules?
- Which of the following is true regarding the @SpringBootTest annotation when testing Spring Boot applications?