Mockito Cookbook
上QQ阅读APP看书,第一时间看更新

Chapter 3. Creating Spies and Partial Mocks

In this chapter, we will cover the following recipes:

  • Creating spies in code
  • Creating spies with custom configuration
  • Creating spies using annotations
  • Creating partial mocks
  • Creating partial mocks of final classes with delegatesTo()
  • Creating spies of final classes with PowerMock