This is true in grails 2.x:
When you add the @Mock (A) annotation, grails will add dynamic methods to for your unit test. You do not need to mock them.
You can do this in your test or in objects called by your test:
def s=new A().save()
A.get(1)
etc.
Grails mocks these methods using the built-in GORM memory, not jdbc.
You can also use criteria queries.
loteq source
share