// these files are loaded to instantiate connector.
reader.loadBeanDefinitions(new ClassPathResource(
DEFAULTS_CONFIG_FILE, ConfigTest.class));
reader.loadBeanDefinitions(new ClassPathResource(
INSTANCE_CONFIG_FILE, ConfigTest.class));
PropertyPlaceholderConfigurer cfg = new PropertyPlaceholderConfigurer();
cfg.setProperties(props);
cfg.postProcessBeanFactory(beanFactory);
String[] beans = beanFactory.getBeanNamesForType(Connector.class);
assertEquals(1, beans.length);
Object obj = beanFactory.getBean(beans[0]);
assertTrue("Expecting instance of Connector interface but the actual "
+ "instance: " + obj.getClass().toString(), obj instanceof Connector);