em.addRule(new InvokeParentRule("addElement"));
SchemaImpl schema = new SchemaImpl();
schema.addElementModel(em);
MockControl control1 = newControl(Module.class);
Module m1 = (Module) control1.getMock();
MockControl control2 = newControl(Module.class);
Module m2 = (Module) control2.getMock();
schema.setModule(m1);
SchemaProcessorImpl p = new SchemaProcessorImpl(null, schema);
Location location1 = newLocation();
ElementImpl element1 = new ElementImpl();
element1.setElementName("cartoon");
element1.addAttribute(new AttributeImpl("name", "flintstone"));
element1.setLocation(location1);
List elements1 = Collections.singletonList(element1);
Location location2 = newLocation();
ElementImpl element2 = new ElementImpl();
element2.setElementName("cartoon");
element2.addAttribute(new AttributeImpl("name", "flintstone"));
element2.setLocation(location2);
List elements2 = Collections.singletonList(element2);
MockControl tControl1 = newControl(Translator.class);
Translator t1 = (Translator) tControl1.getMock();
m1.getTranslator("qualified-id");
control1.setReturnValue(t1);
String flintstoneKeyModule1 = "m1.flintstone";
t1.translate(m1, Object.class, "flintstone", element1.getLocation());
tControl1.setReturnValue(flintstoneKeyModule1);
m1.resolveType("StringHolderImpl");
control1.setReturnValue(StringHolderImpl.class);
m1.expandSymbols("flintstone", location1);
control1.setReturnValue("flintstone");
m1.getTranslator("qualified-id");
control1.setReturnValue(t1);
t1.translate(m1, String.class, "flintstone", element1.getLocation());
tControl1.setReturnValue(flintstoneKeyModule1);
m1.resolveType("StringHolderImpl");
control1.setReturnValue(StringHolderImpl.class);
MockControl tControl2 = newControl(Translator.class);
Translator t2 = (Translator) tControl2.getMock();
m2.getTranslator("qualified-id");
control2.setReturnValue(t2);
String flintstoneKeyModule2 = "m2.flintstone";
t2.translate(m2, Object.class, "flintstone", element2.getLocation());
tControl2.setReturnValue(flintstoneKeyModule2);
m2.expandSymbols("flintstone", location2);
control2.setReturnValue("flintstone");
m2.getTranslator("qualified-id");
control2.setReturnValue(t2);
t2.translate(m2, String.class, "flintstone", element2.getLocation());
tControl2.setReturnValue(flintstoneKeyModule2);
replayControls();
p.process(elements1, m1);
p.process(elements2, m2);