Summary

This chapter provided an overview of test doubles with examples. The following topics covered dummy, stub, mock, fake, and spy. This chapter is a prerequisite for Mockito.

The next chapter will cover the Mockito framework and its advanced uses. Mockito is a mocking framework for Java. It provides the API for mock, spy, and stub creation.

Get Mastering Unit Testing Using Mockito and JUnit 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.