Improve tests with Groovy scripts.