private Group toGroup(final String name, final CacheableOptional<Group> coGroup) throws GroupNotFoundException {
        return coGroup
            .toOptional()
            .orElseThrow(() -> new GroupNotFoundException("Group with name " + name + " not found (cached)."));
    }
Returns a Group by name.

@param name The name of the group to retrieve
@param forceLookup Invalidate the group cache for this group
@return The group corresponding to that name
@throws GroupNotFoundException if the group does not exist.
xmppserver/src/main/java/org/jivesoftware/openfire/group/GroupManager.java