DerivedTestBean inherits = (DerivedTestBean) child.getBean("inheritsWithClass");
// Name property value is overridden
assertTrue(inherits.getName().equals("override"));
// Age property is inherited from bean in parent factory
assertTrue(inherits.getAge() == 1);
assertTrue(inherits.wasInitialized());
}
public void testPrototypeInheritanceFromParentFactoryPrototype() throws Exception {
XmlBeanFactory parent = new XmlBeanFactory(new ClassPathResource("parent.xml", getClass()));
XmlBeanFactory child = new XmlBeanFactory(new ClassPathResource("child.xml", getClass()), parent);