Preface

According to Google Trends, Mockito, compared to its main Java mocking framework competitors, EasyMock and jMock, has been the most widely used since 2011 and this trend has been upward ever since. Given its extremely simple and elegant API, Mockito gives you the possibility to test your application in a readable manner. Furthermore, it's syntax is so intuitive that you'll learn it in no time at all.

The very concept behind this book is to give the reader the possibility to use Mockito in order to write beautiful and comprehensive tests. The Mockito documentation as such is of very high quality, so you should always, regardless of the tool you are using, refer to it when in doubt. This book is an extension to this documentation since it ...

Get Mockito Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.