groovy interface code example Example: groovy implementation of the interface def myObject = [m1: {-> doSomething()}] as TestInterface