Grails: mocking domain objects in unit tests

And, if you want to unit test, you won’t have fancy domain class methods addTo* – like Customer.addToOrders().
They’re generated by Grails on startup.
In order to have addTo*(), inherit from GrailsUnitTestCase and call mockDomain(Customer) in setUp().