In mocking frameworks, you can mock an object or spy on it. What\'s the difference between the two and when would/should I use one over the other?
Mockito warns that partial mocking isn't a good practice and you should revise your Object Oriented architecture. Spy (or partial mocking) is recommended to test legacy code.