This document discusses using mock objects to make unit tests more effective and efficient. It presents a technique called Automock that can automatically generate mock code for tests based on static and dynamic analysis of the test class and its collaborators. This reduces the effort required to develop and maintain mock-based tests. An evaluation of Automock found that it reduced tester effort on mock code development by 96% and reduced mock code development time by 96% compared to manual mock code development. The automatically generated mock code was also found to have equivalent semantics to manually written mock code based on mutation testing and qualitative analysis.