A trait is a reusable set of methods and fields that can be added to one or more classes.
trait BarkingAbility {
String bark(){ "I'm barking!!" }
}
They can be used like normal interfaces, using implements keyword:
class Dog implements BarkingAbility {}
def d = new Dog()
asser...