Component cmp = (Component) Aura.getInstanceService().getInstance(desc);
assertNotNull("Failed to create component with Aura.ComponentDefRef[] type attribute.", cmp);
Object value = cmp.getAttributes().getValue("attr");
assertNotNull(value);
assertTrue(value instanceof ComponentDefRefArrayImpl);
ComponentDefRefArrayImpl cdra = (ComponentDefRefArrayImpl) value;
List<ComponentDefRef> cmpDefRefs = cdra.getList();
assertEquals("Unexpected items in componentDefRef array attribute", 2, cmpDefRefs.size());
// assertTrue(cmpDefRefs.get(0) instanceof ComponentDefRef);
// assertTrue(cmpDefRefs.get(1) instanceof ComponentDefRef);
// Also verifies the order of components
assertEquals("markup://test:text", cmpDefRefs.get(0).getDescriptor().getQualifiedName());