*
* @return the ManagedServiceFactory to test.
*/
public ManagedServiceFactory createManagedServiceFactory() throws NoSuchMethodException {
final BundleContextMock contextMock =
new BundleContextMock("contextMock", expectations);
final MockFactory mockFactory = MockFactory.getDefaultInstance();
final Method registerServiceMethod = BundleContext.class.getMethod(
"registerService",
new Class[]{String.class, Object.class, Dictionary.class});
final MethodIdentifier identifier =