*/
public class StartStopTestCase extends TestCase {
private ClassLoader oldCL;
public void testHelloWorld() throws Exception {
TuscanyRuntime tuscany = new TuscanyRuntime("test", null);
tuscany.start();
ModuleContext moduleContext = CurrentModuleContext.getContext();
assertNotNull(moduleContext);
HelloWorldService helloworldService = (HelloWorldService) moduleContext.locateService("HelloWorld");
assertNotNull(helloworldService);
String value = helloworldService .getGreetings("World");
assertEquals("Hello World", value);
tuscany.stop();
tuscany = new TuscanyRuntime("test", null);
tuscany.start();
moduleContext = CurrentModuleContext.getContext();
assertNotNull(moduleContext);
helloworldService = (HelloWorldService) moduleContext.locateService("HelloWorld");
assertNotNull(helloworldService);
value = helloworldService .getGreetings("World");
assertEquals("Hello World", value);
tuscany.stop();
}