{
MockControl moduleControl = newControl(Module.class);
Module module = (Module) moduleControl.getMock();
MockControl factoryPointControl = newControl(ServicePoint.class);
ServicePoint factoryPoint = (ServicePoint) factoryPointControl.getMock();
MockControl factoryControl = newControl(ServiceImplementationFactory.class);
ServiceImplementationFactory factory =
(ServiceImplementationFactory) factoryControl.getMock();
MockControl pointControl = newControl(ServicePoint.class);
ServicePoint point = (ServicePoint) pointControl.getMock();
InvokeFactoryServiceConstructor c = new InvokeFactoryServiceConstructor();
MockControl errorHandlerControl = newControl(ErrorHandler.class);
ErrorHandler eh = (ErrorHandler) errorHandlerControl.getMock();
// Training !
point.getServiceLog();
pointControl.setReturnValue(LOG);
module.getServicePoint("foo.bar.Baz");
moduleControl.setReturnValue(factoryPoint);
factoryPoint.getParametersCount();
factoryPointControl.setReturnValue(Occurances.REQUIRED);
factoryPoint.getService(ServiceImplementationFactory.class);
factoryPointControl.setReturnValue(factory);
factoryPoint.getParametersSchema();
factoryPointControl.setReturnValue(null);
module.getErrorHandler();
moduleControl.setReturnValue(eh);
String message =
ImplMessages.wrongNumberOfParameters("foo.bar.Baz", 0, Occurances.REQUIRED);
eh.error(LOG, message, null, null);
point.getExtensionPointId();
pointControl.setReturnValue("bleep.Bloop");
point.getServiceInterface();
pointControl.setReturnValue(Runnable.class);
factory.createCoreServiceImplementation(
"bleep.Bloop",
Runnable.class,