new RhinoScript("javaInterfaceTest", "SCA = { javaInterface : 'helloworld.HelloWorldService',};",
null, getClass().getClassLoader());
RhinoSCAConfig scaConfig = new RhinoSCAConfig(rs.getScriptScope());
JavaScriptIntrospector introspector =
new JavaScriptIntrospector(null, new JavaInterfaceProcessorRegistryImpl());
ComponentType comonentType = introspector.introspectScript(scaConfig, rs.getClassLoader());
assertNotNull(comonentType);
Map services = comonentType.getServices();
assertEquals(1, services.size());
ServiceDefinition serviceDefinition = (ServiceDefinition) services.values().iterator().next();
ServiceContract serviceContract = serviceDefinition.getServiceContract();
assertTrue(serviceContract instanceof JavaServiceContract);
JavaServiceContract javaServiceContract = (JavaServiceContract) serviceContract;