}
protected GenericApplicationContext createContext(final Properties properties, String expectedResource) {
GenericApplicationContext context = new GenericApplicationContext();
final RecordingImportingBeanDefinitionDocumentReader documentReader = new RecordingImportingBeanDefinitionDocumentReader(properties);
XmlBeanDefinitionReader xmlReader = new XmlBeanDefinitionReader(context){
@Override
protected BeanDefinitionDocumentReader createBeanDefinitionDocumentReader() {
return documentReader;
}
};
xmlReader.loadBeanDefinitions(new ClassPathResource("beanset/beanset-context.xml"));
List<BeanSetNode> nodes = documentReader.getTopLevelNodes();
System.out.println(documentReader);
assertEquals(1, nodes.size());
final BeanSetNode topLevel = nodes.get(0);