I have a non-service class which is defined as such:
class A{
B b
A( B b ){ this.b = b }
}
where B is a grails service. In my unit tests, I tried this:
A a = new A( new B() );
For some reason, however, b
never gets set, and the variable b [local, the argument to the mehod]
isn't even visible in Intelli-J's debugger when running the test. That is, I can rename the argument to service
, and the debugger shows it as undefined.
When I try to start a server, I get Initialization of bean failed; nested exception is java.lang.reflect.MalformedParameterizedTypeException
, so I'm assuming this is related.
What's going on here?