Compared accessor methods between groovy and java with tests