Map<String, Object> attributes = Maps.newHashMap();
DefDescriptor<ComponentDef> def = addSourceAutoCleanup(ComponentDef.class, String.format(
"<aura:component render=\"client\">" +
attributeInMain1 + attributeInMain2 + attributeInMain3 +
"MAIN CMP%s</aura:component>", source));
Component mainCMP = Aura.getInstanceService().getInstance(def, attributes);
String result = "MAINCMP" +
"<br/>ParentCMP<br/>m.valueParent=defaultattributeInMain1" +
"<br/>ParentCMP<br/>m.valueParent=defaultattributeInMain2" +
"<br/>ParentCMP<br/>m.valueParent=defaultattributeInMain3";
if (testModelWithCount) {
assertEquals(3, TestReinitializeModelWithCount.getCount());
TestReinitializeModelWithCount.clearCount();
} else {
assertEquals(result, getRenderedBaseComponent(mainCMP).replaceAll("\\s+", ""));
}
Map<String, Object> newAttributes = Maps.newHashMap();
newAttributes.put("attributeInMain1", "new attribute In Main1");
newAttributes.put("attributeInMain2", "new attribute In Main2");
newAttributes.put("attributeInMain3", "new attribute In Main3");
mainCMP.getAttributes().set(newAttributes);
mainCMP.reinitializeModel();
if (testModelWithCount) {
assertEquals(3, TestReinitializeModelWithCount.getCount());
TestReinitializeModelWithCount.clearCount();
} else {