ClassPathXmlApplicationContext parent = new ClassPathXmlApplicationContext(
"classpath:/org/springframework/batch/admin/web/resources/webapp-config.xml");
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
new String[] { "classpath:/org/springframework/batch/admin/web/resources/servlet-config.xml" }, parent);
assertTrue(context.containsBean("jobRepository"));
String[] beanNames = BeanFactoryUtils.beanNamesForTypeIncludingAncestors(context.getBeanFactory(),
JobController.class);
assertEquals(1, beanNames.length);
MenuManager menuManager = context.getBean(MenuManager.class);