}
public void testKeyedElement()
{
ElementModelImpl em = new ElementModelImpl("module");
MockControl tmControl = newControl(TranslatorManager.class);
TranslatorManager tm = (TranslatorManager) tmControl.getMock();
MockControl registryControl = newControl(RegistryInfrastructure.class);
RegistryInfrastructure registry = (RegistryInfrastructure) registryControl.getMock();
MockControl symbolExpanderControl = newControl(SymbolExpander.class);
SymbolExpander symbolExpander = (SymbolExpander) symbolExpanderControl.getMock();
em.setElementName("cartoon");
em.setKeyAttribute("name");
AttributeModelImpl am = new AttributeModelImpl();
am.setName("name");
am.setTranslator("cartoon");
em.addAttributeModel(am);
em.addRule(new CreateObjectRule("StringHolderImpl"));
ReadContentRule rule = new ReadContentRule();
rule.setPropertyName("value");
em.addRule(rule);
em.addRule(new InvokeParentRule("addElement"));
SchemaImpl schema = new SchemaImpl("module");
schema.addElementModel(em);
MockControl control = newControl(Module.class);