Skip to content
Sharp

Testing · interview question

When using Mockito in integration tests, what is a common use case?

Multiple choiceMediumchapter-10-curatedpremiumtestingintegration-testing
Choose one answer
Answer and explanation

Correct answer

D. To simulate responses from external services.

Why

Mockito is commonly used to simulate responses from external services, allowing developers to isolate the component under test and ensure it reacts correctly to various conditions without needing actual external services.

Test yourself on Testing

A free test with instant, explained results. No account needed.

Start free test
All Testing questions →