I can mock calls to:
MyDomainClass.createCriteria().list{
eq(\'id\',id)
eq(\'anotherParameter\',anotherParameterId)
}
with:
<
I've found a solution that doesn't compromise my ability to write unit tests -
def myCriteria = new Expando();
myCriteria .get = {Closure cls -> returnThisObject}
MyDomainClass.metaClass.static.createCriteria = {myCriteria }
which does exactly what I wanted and potentially supports testing supplied arguments. Thanks for the other response. Hope this is useful to others testing domain/createCriteria() methods.