+
+ public void testWithProperties() throws IOException {
+ Map<String, ProvidedInterfaceDescriptor> provided = new HashMap<String, ProvidedInterfaceDescriptor>();
+ provided.put("helloService", new DefaultProvidedInterfaceDescriptor(
+ "hello", HelloService.class));
+ SpringComponent system = new SpringComponent("system", _registry,
+ new String[] { HELLO_SERVICE_SPRING_WITH_PROPERTIES_XML },
+ provided,
+ new HashMap<RequiredInterfaceDescriptor, String>());
+ Properties props = new Properties();
+ props.load(new ClassPathResource(PROPERTY_FILE).getInputStream());
+ system.addProperties(props);
+
+ system.start("Hello", new Service[0]);
+ Service[] services = system.getRunningServices();
+ assertEquals("Property Value", services[0].reference(HelloService.class).say());
+ }