Refactor both tests and production code by using Groovy idioms, such as omitting parentheses and using elvis operator