public void testFormalizedComponentClassOperationDTAssignement() throws CoreException {
    Component_c component =
        Component_c.ComponentInstance(
            modelRoot,
            new ClassQueryInterface_c() {

              public boolean evaluate(Object candidate) {
                return ((Component_c) candidate).getName().equals("IF Scope Test Component");
              }
            });
    assertNotNull(component);
    if (!component.Isformal()) formalizeComponent(component);
    Operation_c op = Operation_c.OperationInstance(modelRoot);
    OperationO_TFRPropertySource ps = new OperationO_TFRPropertySource(op);
    ps.getPropertyDescriptors();
    ps.setPropertyValue("DataType", "component_ref");
    DataType_c dt = DataType_c.getOneS_DTOnR116(op);
    SystemModel_c testSys = null;
    if (testGlobals) {
      testSys =
          SystemModel_c.getOneS_SYSOnR9100(
              GlobalElementInSystem_c.getOneG_EISOnR9100(
                  PackageableElement_c.getOnePE_PEOnR8001(dt)));
    } else {
      testSys =
          SystemModel_c.getOneS_SYSOnR4402(SystemDatatypeInPackage_c.getOneSLD_SDINPOnR4401(dt));
    }
    assertTrue("The chosen dt was not a system level one as expected.", testSys != null);
  }
 public void testGlobalMigrationOperationDomain() throws Exception {
   Ooaofooa testRoot =
       Ooaofooa.getInstance("/model_upgrade/models/model_upgrade/domain/domain.xtuml");
   Operation_c param = Operation_c.OperationInstance(testRoot);
   assertNotNull("Unable to locate test element", param);
   DataType_c dt = DataType_c.getOneS_DTOnR116(param);
   assertNotNull("Unable to locate test element", dt);
   GlobalElementInSystem_c gis =
       GlobalElementInSystem_c.getOneG_EISOnR9100(PackageableElement_c.getOnePE_PEOnR8001(dt));
   assertNotNull("Operation was not migrated to use globals.", gis);
   assertTrue(
       "Incorrect data type associated with Operation after global migration",
       dt.getName().equals("boolean"));
 }