Spy in Mockito

# Introduction Mockito is a Java framework used for **mocking** and **unit testing** Java applications. In this lab, we will learn about spies in Mockito. A Spy is like a partial mock, which will track the interactions with the object like a mock. Additionally, it allows us to call all the normal methods of the object. We will use the Mockito.spy() method and annotations to create spies and demonstrate how to stub a Spy.

|
60 : 00

Click the virtual machine below to start practicing