{
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();
SchemaImpl schema = new SchemaImpl("module");
schema.setRootElementClassName(ArrayList.class.getName());
ModuleDefinition md = createModuleDefinition("test");
XmlServicePointDefinitionImpl xmlSpd = new XmlServicePointDefinitionImpl(md);
xmlSpd.setParametersCount(Occurances.REQUIRED);
xmlSpd.setParametersSchema(schema);
Location location = newLocation();
InvokeFactoryServiceConstructor c = new InvokeFactoryServiceConstructor(location, "module");
ErrorLog log = (ErrorLog) newMock(ErrorLog.class);
// Training !
point.getErrorLog();
pointControl.setReturnValue(log);
module.getServicePoint("foo.bar.Baz");
moduleControl.setReturnValue(factoryPoint);