MockControl control = newControl(BeanFactory.class);
BeanFactory beanFactory = (BeanFactory) control.getMock();
MockControl fpc = newControl(ServiceImplementationFactoryParameters.class);
ServiceImplementationFactoryParameters fp = (ServiceImplementationFactoryParameters) fpc
.getMock();
lf.setDefaultBeanFactory(beanFactory);
SpringBeanParameter param = buildParameter("fred", null);
Object fred = new Object();
beanFactory.getBean("fred", List.class);
control.setReturnValue(fred);
fp.getFirstParameter();
fpc.setReturnValue(param);
fp.getServiceInterface();
fpc.setReturnValue(List.class);
replayControls();
Object actual = lf.createCoreServiceImplementation(fp);