public void testSimpleServiceExported() {
waitOnContextCreation("org.springframework.osgi.samples.simpleservice");
ServiceReference ref = bundleContext.getServiceReference(MyService.class.getName());
assertNotNull("Service Reference is null", ref);
try {
MyService simpleService = (MyService) bundleContext.getService(ref);
assertNotNull("Cannot find the service", simpleService);
assertEquals("simple service at your service", simpleService.stringValue());
} finally {
bundleContext.ungetService(ref);
}
}