Chapter 4. Resolving Out-of-container Dependencies with Mockito

The preceding chapter covered the container Spring integration testing and the Spring testing framework. This chapter deals with the role of the Mockito framework in Spring unit testing and how to resolve container dependency with Mockito. The following topics are covered in depth in this chapter:

  • Unit testing the service layer with Mockito
  • Unit testing the DAO layer with Mockito
  • Unit testing the web layer with Mockito

Enterprise applications change over time. There are several reasons for change, such as the addition of new features, bug fixing, improvement in the non functional requirements such as performance or scalability, regulatory changes such as ICD-10 (ICD-10 is the 10th revision ...

Get Mockito for Spring 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.