Skip to content
Sharp

Testing · interview question

Which change is best verified with a fast unit test rather than an integration test?

Multiple choiceEasychapter-10-curatedpremiumtestingunit-testing-with-junit
Choose one answer
Answer and explanation

Correct answer

C. A pure tax-calculation rule with no database or network access

Why

Unit tests are ideal for deterministic domain logic that has no external I/O. They run quickly and isolate business rules without bringing in database, HTTP, or framework concerns.

Test yourself on Testing

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

Start free test
All Testing questions →