With Safari, you learn the way you learn best. Get unlimited access to videos, live online training,
learning paths, books, tutorials, and more.

Mockito for Spring

Book Description

Learn all you need to know about the Spring Framework and how to unit test your projects with Mockito

In Detail

Mockito is a testing framework that creates external dependencies; this process is called mocking. This book will provide you with the skills you need to successfully build and maintain meaningful unit and integration test cases for Spring Framework code. This book starts with a brief introduction to the Spring Framework, including its components and architecture.

Packed with real-world examples, the book covers how to make Spring code testable and mock container and external dependencies using Mockito. You then get a walkthrough of the steps that will help you in applying Spring 4 Framework features and advanced Spring testing module features in the real world. By the end of the book, you will be a competent software tester with Spring and Mockito.

What You Will Learn

Uncover the architecture of the Spring testing framework and write integration tests

Explore test doubles and work with dummy, spy, fake, stub, and mock objects

Mock Spring container dependencies using Mockito

Refresh your Spring Framework knowledge

Learn about the advanced Spring 4 Framework features

Work with the REST controller to build and unit test RESTful web services

Cache data with Spring and EhCache

Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.