public void testInheritedMapping() throws Exception {
BeanTypeInfo bti = new BeanTypeInfo(GregorianCalendar.class, "http://util.java");
BeanType beanType = new BeanType(bti);
beanType.setSchemaType(new QName("http://util.java{GregorianCalendar}"));
AegisContext context = new AegisContext();
context.initialize();
TypeMapping mapping = context.getTypeMapping();
// we are replacing the default mapping.
mapping.register(beanType);
XmlSchema schema = newXmlSchema("http://util.java");
beanType.writeSchema(schema);