write tests in groovy to shorten the syntax