In xUnit Test Patterns, Gerard Meszaros introduce the term "Test Double" and he lists various kinds of double: dummy object, fake object, stub, spy, and mock. You can read the summary at Martin Folwer's Bliki. Last year I wrote own mock library for Perl. We can use Test::MockObject as (Gerard's definition of) mock. But it's hard. So my library provides "record-and-verify" style interface like Mox