Advanced concepts


This is a preview lesson
Register or sign in to take this lesson.


What will students be able to do at the end of this section?

What a Mockito Spy is

When should you use spies in your tests

How to define spies (using the “@Spy” annotation and the factory method “spy()”)

How to implement tests that use spies

Common pitfalls/”gotchas” when using spies