Testing made sweet with a Mockito

5f57d2d205e77e185986459c1b89a874?s=47 Jeroen Mols
November 11, 2016

Testing made sweet with a Mockito

Slides from my talk at Devoxx Belgium 2016
video: https://www.youtube.com/shared?ci=gkLiuk-z61A

Thanks to many tools and libraries, writing unit tests is a breeze! So all your apps currently have >80% code coverage, right? Yay! Or wait... is it really? Is all your common logic (networking, databases,...) tested? Do you isolate parts of your code base to keep your tests small? And what about providing relevant testing data?

In order to achieve this, you need to make use of mocks and stubs. And that's exactly what this talk will be about: What is a mock? What's the difference between a mock and a stub? Are mocks the only way to provide relevant data for your unit tests? What do I do with final classes/methods in the SDKs I use? How do I architect my app to make it easier to test? ...

After having adopted TDD as my main development workflow for almost a year now, I feel comfortable saying everything can be tested. Its just a matter of having someone experience show you how.


Jeroen Mols

November 11, 2016