}
public void testBean()
throws Exception
{
Type stringType = mapping.getTypeCreator().createType(String.class);
MapType type = new MapType(new QName("urn:test", "map"), stringType, stringType);
type.setTypeClass(Map.class);
type.setTypeMapping(mapping);
assertNotNull(type.getSchemaType());
assertEquals("entry", type.getEntryName().getLocalPart());
assertEquals("urn:test", type.getEntryName().getNamespaceURI());
assertEquals("key", type.getKeyName().getLocalPart());
assertEquals("urn:test", type.getKeyName().getNamespaceURI());
assertEquals("value", type.getValueName().getLocalPart());
assertEquals("urn:test", type.getValueName().getNamespaceURI());
assertTrue(type.isComplex());
Set deps = type.getDependencies();
assertEquals(1, deps.size());
Type stype = (Type) deps.iterator().next();
assertTrue(stype instanceof StringType);
// Test reading
ElementReader reader = new ElementReader(getResourceAsStream("/org/codehaus/xfire/aegis/type/collection/Map.xml"));
//MessageReader creader = reader.getNextElementReader();