+
+ public void testWithPropertiesAsBean() throws IOException {
+ Map<String, ProvidedInterface> provided = new HashMap<String, ProvidedInterface>();
+ provided.put("helloService", new DefaultProvidedInterface("hello",
+ HelloService2.class));
+ SpringComponent system = new SpringComponent("system",
+ new String[] { HELLO_SERVICE_SPRING_WITH_PROPERTIES_XML2 },
+ provided, new HashMap<RequiredInterface, String>());
+ Properties props = new Properties();
+ props.load(new ClassPathResource(PROPERTY_FILE).getInputStream());
+ system.addProperties("properties", props);
+
+ Scope scope = system.start(_externalScope);
+
+ ProvidedInterface[] services = scope.getProvidedInterfaces();
+
+ Properties props2 = scope.getInterfaceImplementation(services[0], HelloService2.class).getProperties();
+ assertEquals(props, props2);
+ }