// Check that the proxy registration was done on the original provider bundle's context
EasyMock.verify(providerBC);
// Test that the actual proxy invokes the original service...
ServiceFactory proxyServiceSF = (ServiceFactory) serviceMap.get(proxySR);
TestServiceAPI proxyService = (TestServiceAPI) proxyServiceSF.getService(clientBundle, null);
assertNotSame("The proxy should not be the same object as the original service", testService, proxyService);
assertEquals("Doing it", proxyService.doit());
EasyMock.reset(clientBC);
EasyMock.expect(clientBC.ungetService(sr)).andReturn(true).once();
EasyMock.replay(clientBC);
proxyServiceSF.ungetService(clientBundle, null, proxyService);
EasyMock.verify(clientBC);
}