Topic - SubTopic | Basic | Intermediate | Advanced | Expert |
---|---|---|---|---|
Mockito Basics - Overview | What is Mockito?, Features of Mockito, Difference between Mockito and other mocking frameworks | Mockito architecture, Mock vs Spy, Why use mocking | Mockito vs PowerMockito, Use cases for unit testing, Integration with JUnit | Enterprise-level mocking strategies, Multi-module testing, Designing testable code with Mockito |
Mocking & Spying | Creating mocks, Basic stubbing, Verifying method calls | Spy objects, Partial mocking, Argument matchers | Mocking final classes, Mocking static methods (PowerMockito), Custom answers | Complex stubbing, Chained method mocking, Performance considerations for mocks |
Annotations & Setup | @Mock, @Spy, @InjectMocks, @Captor | MockitoAnnotations.openMocks(), initMocks(), Field injection | Annotation-based vs programmatic mocking, Constructor injection | Advanced test setup patterns, Dependency injection for large modules, Integration with Spring Boot tests |
Verification & Behavior | verify() basics, verifyZeroInteractions, verifyNoMoreInteractions | Times verification, InOrder verification, AtLeast/AtMost checks | Verifying private methods, Complex interaction verification | Verifying multi-threaded code, Asynchronous call verification, Global interaction strategies |
Stubbing & Argument Matchers | when().thenReturn(), thenThrow(), thenAnswer() | ArgumentMatchers.any(), eq(), refEq() | Custom argument matchers, Answer interface, Dynamic stubbing | Advanced conditional stubbing, Context-aware answers, Complex return sequences |
Exceptions & Timeouts | Stubbing exceptions, verify exceptions, Timeout verification | doThrow(), doAnswer(), doReturn() | Handling asynchronous exceptions, Mockito with CompletableFuture | Exception handling patterns in complex tests, High-concurrency testing |
Mockito with JUnit | JUnit 4 vs JUnit 5 integration, Basic test case structure | @RunWith(MockitoJUnitRunner.class), MockitoExtension, Nested tests | Parameterized tests, Combining multiple extensions, Test lifecycle management | Advanced integration with Spring Boot, Testcontainers, Multi-module test suites |
Behavior Driven Testing | BDDMockito basics, given/when/then syntax | Combining BDDMockito with JUnit, Verification in BDD style | Advanced BDD scenarios, Custom BDD answers | Enterprise-level BDD testing strategies, Integrating BDD with CI/CD pipelines |
Advanced Features | N/A | Captors (@Captor), Resetting mocks, Clearing invocations | Deep stubs, Mocking collections, Mocking generic types | Optimizing large test suites, Multi-threaded mocks, Custom mock frameworks |
Tools & Ecosystem | N/A | Integration with AssertJ, Hamcrest, Basic IDE setup | Mockito with Spring Boot, Mockito with PowerMockito, Test coverage tools | Enterprise testing strategies, Scaling Mockito tests for microservices, CI/CD automation for tests |
13 September 2025
#Mockito
Subscribe to:
Post Comments (Atom)
Most views on this month
-
#CoreJava Last updated - V4 (13-Sep-2025) Key Concepts Level Topic Subtopics Basic Introduction History of Java, Fe...
-
#GIT Question count - Last updated - V4 (02-Sep-2025) Key Concepts Level Subtopic Topics Basic Introductio...
-
#Python Question count - Last updated - V4 (01-Sep-2025) Key Concepts Level Subtopic Topics Basic Language...
-
#Machine Learning Last updated - V4 (13-Sep-2025) Key Concepts Level Topic Subtopics Basic Introduction to ML ...
-
#Spring_Framework Last updated - V4 (13-Sep-2025) Key Concepts Level Topic Subtopics Basic Introduction What i...
-
#MongoDB Key Concepts Level Topic Subtopics Basic Introduction to MongoDB What is MongoDB, Features, Advantages, NoS...
-
#Apache_Kafka Question count - Last updated - V4 (02-Sep-2025) Key Concepts Level Subtopic Topics Basic Ka...
-
#Apache_Spark Last updated - V4 (13-Sep-2025) Key Concepts Level Topic Subtopics Basic Introduction to Spark ...
-
#AWS Question count - 0 Last updated - V4 (08-Jun-2025) Interview question What is EC2? What is SnowBall? What is Clou...
-
#Docker Question count - 0 Last updated - V4 (12-Sep-2024) Interview question What is a Container? What does the docker...
Popular Posts
-
#CoreJava Last updated - V4 (13-Sep-2025) Key Concepts Level Topic Subtopics Basic Introduction History of Java, Fe...
-
#Kubernetes Question count - 0 Last updated - V4 (06-Jan-2025) Interview question Define Stateful sets in Kubernetes. D...
-
Category Service AWS Azure GCP IBM cloud Oracle cloud Allibaba cloud Comput...
-
#Spring_Framework Last updated - V4 (13-Sep-2025) Key Concepts Level Topic Subtopics Basic Introduction What i...
-
#CoreJava_08 Question count - 0 Last updated - V4 (13-Jun-2025) Interview question What were the issues that were fixed ...
-
#Apache_Kafka Question count - Last updated - V4 (02-Sep-2025) Key Concepts Level Subtopic Topics Basic Ka...
-
#AWS Question count - 0 Last updated - V4 (08-Jun-2025) Interview question What is EC2? What is SnowBall? What is Clou...
-
#Docker Question count - 0 Last updated - V4 (12-Sep-2024) Interview question What is a Container? What does the docker...
-
#MongoDB Key Concepts Level Topic Subtopics Basic Introduction to MongoDB What is MongoDB, Features, Advantages, NoS...
-
#Spring_Cloud Question count - 0 Last updated - V4 (18-Jun-2025) Interview question What is Spring Cloud? What are the ...
No comments:
Post a Comment