The difference between Mock and Spy in Mockito
• When Mockito creates a Mock, it does so from the Class of an Type, not from an actual instance. The mocked object simply creates a barebones shell instance of the Class, entirely instrumented to track interactions with it. When test case calls the method, attributes value in mocked object won't change, with no side effect.
• Spy will wrap an existing instance. Spied object will still behave in the same way as the normal instance – the only difference is that it will also be instrumented to track all the interactions with it.