@Test
@SuppressWarnings( "unchecked" )
public void testLookupMessagingClientFactoryRegistryService_withReference() {

	BundleContext bundleCtx = Mockito.mock( BundleContext.class );
	OsgiHelper osgiHelper = Mockito.mock( OsgiHelper.class );
	Mockito.when( osgiHelper.findBundleContext()).thenReturn( bundleCtx );
	ServiceReference<MessagingClientFactoryRegistry> reference = Mockito.mock( ServiceReference.class );
	Mockito.when( bundleCtx.getServiceReference( MessagingClientFactoryRegistry.class )).thenReturn( reference );
	MessagingClientFactoryRegistry registryMock = Mockito.mock( MessagingClientFactoryRegistry.class );
	Mockito.when( bundleCtx.getService( reference )).thenReturn( registryMock );
	MessagingClientFactoryRegistry registry = ReconfigurableClient.lookupMessagingClientFactoryRegistryService( osgiHelper );
	Assert.assertNotNull( registry );
	Assert.assertEquals( registryMock, registry );
}