Mockito Made Clear

Jan 1, 2023·
Ken Kousen
Ken Kousen
· 0 min read
Abstract
Mockito is the most popular framework in the Java world for automating unit testing with dependencies. Learn the Mockito API and how and when to use stubs, mocks, and spies. On a deeper level, discover why the framework does what it does and how it can simplify unit testing in Java. Using Mockito, you’ll be able to isolate the code you want to test from the behavior or state of external dependencies without coding details of the dependency. You’ll gain insights into the Mockito API, save time when unit testing, and have confidence in your Java programs.
Type
Publication
Pragmatic Bookshelf
publications
Ken Kousen
Authors
President, Kousen IT, Inc.
Ken Kousen is a Java Champion, the author of six technical books, and a Professor of the Practice in Computer Science at Trinity College in Hartford, CT. He runs Kousen IT, Inc., offering technical training, mentoring, and software development in Java, Kotlin, Spring, Gradle, Android, and AI/LLM topics.