GROOVY-6276: Fix unit test on 2.2.X branch because of missing closure param type inference