}
public void testLocalSessionFactoryBeanWithTypeDefinitions() throws Exception {
XmlBeanFactory xbf = new XmlBeanFactory(new ClassPathResource("typeDefinitions.xml", getClass()));
TypeTestLocalSessionFactoryBean sf = (TypeTestLocalSessionFactoryBean) xbf.getBean("&sessionFactory");
TypeDef type1 = (TypeDef) sf.mappings.getTypeDef("type1");
TypeDef type2 = (TypeDef) sf.mappings.getTypeDef("type2");
assertEquals("mypackage.MyTypeClass", type1.getTypeClass());
assertEquals(2, type1.getParameters().size());
assertEquals("value1", type1.getParameters().getProperty("param1"));
assertEquals("othervalue", type1.getParameters().getProperty("otherParam"));
assertEquals("mypackage.MyOtherTypeClass", type2.getTypeClass());
assertEquals(1, type2.getParameters().size());
assertEquals("myvalue", type2.getParameters().getProperty("myParam"));
}