/*
   * JD: Overriding manually and playing with bean definitions. We do this
   * because we have not ported all the mock test data to a 2.x style configuration
   * directory, so we need to force the legacy data directory loader to engage.
   */
  protected void loadBeanDefinitions(XmlBeanDefinitionReader reader)
      throws BeansException, IOException {
    super.loadBeanDefinitions(reader);

    if (useLegacyGeoServerLoader) {
      BeanDefinition def = reader.getBeanFactory().getBeanDefinition("geoServerLoader");
      def.setBeanClassName("org.geoserver.test.TestGeoServerLoaderProxy");
    }
  }