You can create your BaseController
as an abstract class and let it in the controllers folder.
abstract class BaseController<T> {
}
Normally I tend to create an concrete controller to test my base abstraction and use the @TestFor
to use the Grails testing features for controllers.
Or you can annotate your test:
@GrailsUnitTestMixin
@Mock(MyDomainClass)
class BaseControllerTest extends Specification {
}