Book Image

Mockito for Spring

By : Sujoy Acharya
Book Image

Mockito for Spring

By: Sujoy Acharya

Overview of this book

Table of Contents (12 chapters)
Mockito for Spring
About the Author
About the Reviewers

Chapter 2. Working with JUnit and Mockito

This chapter covers the unit testing concept, JUnit 4 framework, Eclipse setup, test doubles, and mocking with Mockito.

The following topics are covered in this chapter:

  • JUnit 4 annotations

  • Assertion methods and assertThat

  • The @RunWith annotation

  • Exception handling in JUnit

  • JUnit test suite

  • Overview of Mockito and Mockito APIs

  • Advanced Mockito examples