Ok, I figured out that Integration Testing is documented in Chapter 34 of the reference manual - in the process of trying it out. However, a quick question - the example and the ComponentTest API suggest that we can only invoke methods with no parameters. Is it possible at all to test component methods that take parameters? If not, is the use of such methods discouraged? Why?
Actually you can test methods with parameters but you can't use invokeMethod to do so...
You need to get your component first then call your method(s) like this:
SecurityService securityService = (SecurityService) getInstance(SecurityService.class); securityService.createUser("username", "pwd", "role");
Thanks so much Matt! I am now able to proceed with the test.
I would suggest (to committers) to add this way of invoking a test in the docs (section 34.2) - the docs gave me the impression that invokeMethod is the only way. Also it would be nice to clarify the advantage of using invokeMethod vs. getInstance() followed by a direct call (which seems more clearer to me).
Thanks again, Matt.