code: @RunAsSystem
    public Group getGroup(String groupName) {
      Fetch roleFetch = new Fetch().field(RoleMetadata.NAME).field(RoleMetadata.LABEL);
      Fetch fetch =
          new Fetch()
              .field(GroupMetadata.ROLES, roleFetch)
              .field(GroupMetadata.NAME)
              .field(GroupMetadata.LABEL)
              .field(GroupMetadata.DESCRIPTION)
              .field(GroupMetadata.ID)
              .field(GroupMetadata.PUBLIC)
              .field(GroupMetadata.ROOT_PACKAGE);
  
      Group group =
          dataService
              .query(GroupMetadata.GROUP, Group.class)
              .eq(GroupMetadata.NAME, groupName)
              .fetch(fetch)
              .findOne();
      if (group == null) {
        throw new UnknownEntityException(
            groupMetadata, groupMetadata.getAttribute(GroupMetadata.NAME), groupName);
      }
      return group;
    }
docs: Get the group entity by its unique name.
  
  @param groupName unique group name
  @return group with given name
  @throws UnknownEntityException in case no group with given name can be retrieved