def hobby } def persons = [] persons << new Person(name: "peter", age: 33, hobby: "groovy") persons << new Person(name:"chris", age:28) assert persons.age == [33, 28] assert persons*.getName() == ["peter", "chris"] assert persons[2]?.name == null assert persons[0].hobby ?: "no hobbies" == "groovy" assert persons[1].hobby ?: "no hobbies"== "no hobbies"