concept Mockito in category software development

This is an excerpt from Manning's book Agile ALM: Lightweight tools and Agile strategies.
In this chapter, we’ll first look at what makes productive workspaces and review concepts from earlier chapters, including how to build code in sandboxes. Next, we’ll take a deeper look at a technique for creating testing stubs called mocking, which uses substitutes for real objects in tests. We’ll discuss mocking in general, and Mockito—a leading Java mocking framework—in particular. Lastly, we’ll talk about Cargo, which is a smart interface to application containers, and we’ll discuss TeamCity for running private builds on a remote build machine. We’ll also cover the importance of having consistent builds whether they’re triggered in a private workspace or on the official build server. I call this capability a congruent build.
The static import of Mockito
makes it easy to access the entire Mockito API. To maximize clarity, the test setup
is placed outside the test method. Our givens
are that the mock is stubbed to return a canned result when a particular method with a particular argument is called using the stubbing API. We ensure that a particular method with particular arguments
was called on the collaborator (verification API).
The differences between Mockito and conventional mocking frameworks revolve around the use of the terms spy versus mock, but there are a couple of interesting developer-friendly Mockito features. Some of these aren’t unique to Mockito—other tools might do something similar, and if they don’t, I encourage their authors to implement it! I am certain that when Mockito was developed, I couldn’t find those features in other tools:
makes it easy to access the entire Mockito API. To maximize clarity, the test setup
is placed outside the test method. Our givens
are that the mock is stubbed to return a canned result when a particular method with a particular argument is called using the stubbing API. We ensure that a particular method with particular arguments
was called on the collaborator (verification API).