Appendix C. Brief EasyMock tutorial

![]() |
Import static utility methods from EasyMock and the class itself. |
![]() |
Ask EasyMock to create mock objects for the given interface. |
![]() |
Record expected interactions. |
![]() |
This is an alternative, functionally equivalent syntax for the previous syntax. |
![]() |
When we’re done recording expectations, we move the mocks to replay mode. |
![]() |
With everything set up, we exercise the code under test. |
![]() |
We ask the mock objects to verify that the expected interactions took place. |