@Override
 protected void initBeanDefinitionReader(XmlBeanDefinitionReader beanDefinitionReader) {
   this.registeredComponents = new HashSet<ComponentDefinition>();
   beanDefinitionReader.setEventListener(
       new StoringReaderEventListener(this.registeredComponents));
   beanDefinitionReader.setSourceExtractor(new PassThroughSourceExtractor());
 }
 @Before
 public void setUp() throws Exception {
   XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(this.beanFactory);
   reader.setEventListener(this.eventListener);
   reader.loadBeanDefinitions(new ClassPathResource("txNamespaceHandlerTests.xml", getClass()));
 }