invalidateDMOProjectCache.fire(new InvalidateDMOProjectCacheEvent(null, null, path));
DataModelTO reloadedModel = modelerService.loadModel(project);
assertNotNull(reloadedModel);
ProjectDataModelOracle projectDataModelOracle = dataModelService.getProjectDataModel(path);
String types[] = ProjectDataModelOracleUtils.getFactTypes(projectDataModelOracle);
if (types != null) {
for (String type : types) {
if ((objectPackage + "." + objectName).equals(type)) {
// Check type annotations
Set<Annotation> annotations = ProjectDataModelOracleUtils.getTypeAnnotations(projectDataModelOracle, type);
assertNotNull(annotations);
assertEquals("Type " + type + " should hold 3 annotations: ", 3, annotations.size());
checkAnnotation(annotations, AnnotationDefinitionTO.LABEL_ANNOTATION, objectLabelValue);
checkAnnotation(annotations, AnnotationDefinitionTO.DESCRIPTION_ANNOTATION, objectDescriptionValue);
checkAnnotation(annotations, AnnotationDefinitionTO.ROLE_ANNOTATION, objectRoleValue);
// Check type field annotations
ModelField[] fields = projectDataModelOracle.getProjectModelFields().get(type);
assertNotNull(fields);
assertEquals("Error in type " + type + "'s fields: ", 2, fields.length);
Map<String, Set<Annotation>> mFieldAnnotations = ProjectDataModelOracleUtils.getTypeFieldsAnnotations(projectDataModelOracle, type);
assertNotNull(mFieldAnnotations);
Set fieldAnnotations = mFieldAnnotations.get(fieldName);