Skip to content
Sharp

Testing · interview question

Which of the following is a potential risk of overusing mocks in unit tests?

Multiple choiceHardchapter-10-curatedpremiumtestingmocking-with-mockito
Choose one answer
Answer and explanation

Correct answer

C. Tests may become too implementation-specific.

Why

Overusing mocks can lead to tests that are tightly coupled to the implementation details of the code, making them brittle and prone to breaking with refactoring. This reduces the tests' ability to guarantee the correctness of the system's behavior.

Test yourself on Testing

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

Start free test
All Testing questions →