Q: Mock-Signature in Spock-Test-Framework seems not to be as in docs in the Spock-Docs, a Mock/Spy/Stub using Constructor Arguments, is given with this signature:
def subscriber = Spy(SubscriberImpl, constructorArgs: ["Fred"])

(see: http://spockframework.org/spock/docs/1.1/all_in_one.html#Spies)
However, in spock.mock.MockingApi, there are several signatures for each Spy/Mock/Stub, but if they have additional arguments, they have a map as first argument, then followed by the class to mock, e.g.
public <T> T Spy(Map<String, Object> options, Class<T> type)

Now, I have two questions:
1) How does Groovy/Spock make the test work if I use the order as in the docs? Becaues actually, it works...
2) The whole question came to me after an update of IntelliJ from 2017.3 to 2018.1, after which IntelliJ refused to accept the Subscriber (in the example above) as Object of type SubscriberImpl, which it did before the update - code unchanged... If I turn things around and add another Bracket and "as Map", everything works fine, as this is closely to the code in MockingApi:
def subscriber = Spy([constructorArgs: ["Fred"]] as Map<String, Object>, SubscriberImpl)

But anyways, how does it come to change the behaviour with the update and how did it work before? Maybe someone can relief my confusion...? 
Thanks.

A: It is a built-in Groovy feature to convert named parameters into a map, see


*

*Groovy Goodness: Named Parameters are Converted to Map

*Groovy Goodness: Turn Method Parameters Into Named Map Arguments With IntelliJ IDEA
As to why IDEA behaves like you described, I don't know. I am also using IDEA 2018 and see the same. Search for the JetBrains bug database and create one if it does not exist yet. It is only a cosmetic thing anyway, but would be nice to be fixed. BTW, you can also fix the IDE's coloring the background because of the method signature like this:
def subscriber = Spy(SubscriberImpl as Class, constructorArgs: ["Fred"])

Or like this (more elegant and also more typesafe):
SubscriberImpl subscriber = Spy(constructorArgs: ["Fred"])

