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