Hi there, I am using Spock framework in my Java project and I have a question that document can not help :(
Here is the case:
In one of my validatorImpl, before returning, I do something with error message handler like this:
context.buildConstraintViolationWithTemplate(msg).addPropertyNode(mstChkGroupCodeDocumentNo.clearingNo()).addConstraintViolation();
And absolutely, this method should be mocked when testing the main logic of validator.
I don't know how to mock this kind of chained methods calling with Spock.
Please help me, thank you.