Mockito
Mockito is a Java mocking framework for creating and configuring test doubles and verifying their interactions with dependencies.
Quarkus in Action
Mockito is a Java mocking framework for creating test doubles and specifying their behavior dynamically.
- How it is used
- Isolates Quarkus application tests from costly, unavailable, slow, or remote collaborators.
- How deep it goes
- Explains dynamic mock creation, configured behavior, CDI installation, scope limits, and native-mode constraints.
- Examples
- Uses a mocked GraphQLInventoryClient that returns one Peugeot during an availability-and-reservation test.
- What you can do after
- Apply it via QuarkusMock and Mockito DSL to isolate collaborators while testing application behavior.
Kafka for Architects
Mockito is a Java mocking framework for creating and configuring test doubles that substitute for real dependencies.
- How it is used
- Isolates Kafka-backed services during lightweight unit tests by replacing networked producers and consumers with mock dependencies.
- How deep it goes
- Defines mock substitution and behavioral verification, but stops short of detailed Mockito APIs or implementation walkthroughs.
- Examples
- Uses ProfileService, Customer360Service, mocked Kafka components, return values, producer calls, and downstream side effects.
- What you can do after
- Apply via Mockito to test Kafka-backed service behavior without a Kafka cluster or real network communication.
Related concepts
- mockingproduces · Mocking is a testing technique that replaces a real dependency with a controlled substitute to simulate behavior or inspect interactions.
- ArgumentCaptorused by · ArgumentCaptor is a Mockito utility that captures arguments passed to a method so tests can inspect them.
- testused by · A test is a procedure or check that evaluates behavior using specified inputs or evidence against expected results or criteria.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

