MethodResult result = MethodResult.newVoidResult();
when(callrouter.sendMethodCallWithResult(anyString(), anyString(), any(MethodCall.class))).thenReturn(result);
registerService(callrouter, new Hashtable<String, Object>(), OutgoingPortUtilService.class);
registrationManager = new ConnectorRegistrationManager(bundleContext,
mock(TransformationEngine.class), new ForwardMethodInterceptor(), new SecurityAttributeProviderImpl());
ProxyConnectorProvider proxyConnectorProvider = new ProxyConnectorProvider();
proxyConnectorProvider.setId(Constants.EXTERNAL_CONNECTOR_PROXY);
proxyConnectorProvider.setBundleContext(bundleContext);
proxyConnectorProvider.setOutgoingPortUtilService(callrouter);
connectorRegistry = new ProxyConnectorRegistryImpl();
proxyConnectorProvider.setConnectorRegistry(connectorRegistry);
registerService(proxyConnectorProvider, new Hashtable<String, Object>(), VirtualConnectorProvider.class);
new Activator().start(bundleContext);
}