Testing Java code from Groovy