private Function<List<AGroup>, AGroup> singleAGroupFunction(long groupIdToValidate) {
        return aGroups -> {
            if (aGroups.isEmpty()) {
                throw new AMenuConfigurationException("Group with id: " + groupIdToValidate + " does not exist.");
            } else if (aGroups.size() == 1) {