Summary

This chapter covered the Mockito overview, unit test qualities, and the significance of Mockito in unit testing. It explained and provided examples of stubbing, answering, throwing exceptions, argument matcher, and method call verification. It also covered the Mockito architecture.

By now, you should be able to verify method calls, stub methods, and throw exceptions using the Mockito framework.

The next chapter, Accelerating Mockito, focuses on advanced Mockito topics.

Get Mockito Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.