What is the best practice to test a Grails Service which depends on another Service? The default mixin TestFor correctly inject the service under test, for eg:
@TestFor(TopService)
class TopServiceTests {
@Test
void testMethod() {
service.method()
}
}
but if my instance of TopService (service) relies on another Service, like InnerService:
class TopService {
def innerService
}
innerService will not be available, dependency injection doesn't seem to fill this variable. How should I proceed?