if (getGroup(name) != null) {
String exceptionMessage = String.format(
"The group '%s' already exists. All groups must have unique names.", name);
throw new UniqueNameException(exceptionMessage);
} else {
DataModelGroup group = new BasicModelGroup(name);
this.groups.put(name, group);
return group;
}
}