The Mockito framework is the most popular library for creating mocks, stubs, and spies for your tests. This talk reviews why and how you might want to do that, including unit vs integration tests, creating your own mocks and stubs, setting expectations, and verifying the results.
The Mockito documentation is notoriously misleading if you don't already know the principles behind the library. This talk gives an example that hopefully clears up any confusion and makes the docs useful. Many examples will be provided covering a wide range of capabilities. In addition to the basics, issues like mocking static methods, mocking final methods and classes, using spies for existing classes, and more will be examined.
For more on-demand content, visit: [ Ссылка ]
![](https://i.ytimg.com/vi/aXjx_tz6RsU/maxresdefault.jpg)