Groovy is an agile and dynamic language for the Java Virtual Machine. In this blog entry, Scott Leberknight makes use of Groovy to create Mock Objects which are basic artifacts used in software testing. He cites the primary reasons for choosing Groovy in such a situation, as simplicity and power, saying :
Now, this being a Java project many people assume 80% is pretty good and that getting upwards of 90% coverage and beyond takes a superhuman effort. In the past I would have agreed. Now that I am learning Groovy, however, I no longer agree and now think it is not only possible to get above 90% coverage and close to 100%, but quite easy.
Read the complete entry : http://www.nearinfinity.com/blogs/page/sleberkn?entry=dirt_simple_mocks_in_groovy