Comparing a list of messages with a list inside an object
Instead of this:


final List&lt;String&gt; actualErrors = new ArrayList&lt;&gt;()



I believe you can write simply:

final actualErrors = []


I don't really understand the point of this:


assert [ ] == ((actualErrors - expectedErrors) + (expectedErrors - actualErrors))



The only way this will be true is if this is true:

assert actualErrors == expectedErrors


Which is a lot simpler.

Btw, this is not idiomatic in Groovy:


assert [ ] == something



This is the idiomatic way:

assert !something


(because non-empty collections are true)