- assertTrue(services[0].getImplementation() instanceof HelloService);
- assertEquals("Hello world!", ((HelloService)services[0].getImplementation())
- .say());
- system.stop();
+ Object service = runtime.getInterfaceImplementation(services[0], Object.class);
+ assertTrue(service instanceof HelloService);
+
+ // BUG; Provided services should be made available in the external scope.
+ Object service2 = _externalScope.getInterfaceImplementation(provided.get("helloService"), Object.class);
+ assertSame(service, service2);
+
+ assertEquals("Hello world!", ((HelloService) service).say());
+ system.stop(runtime);