Description: Editor's note: The first recipe we plucked from the pages of Java Extreme Programming Cookbook showed you how to set up an efficient development environment using an Ant buildfile. In these two recipes, excerpted from Chapter 6 on \"Mock Objects,\" learn how to create a mock implementation of an event listener interface, and how to avoid duplicated validation logic in your tests. And check back here next week for recipes on creating a load test and executing a custom template.