protected Map fetchAttributes(final Map<String, String> container,
                                  final Function<Map.Entry<String, ?>, List<?>> valueMapper) {
        return container.entrySet()
            .stream()
            .map(entry -> Pair.of(entry.getValue(), valueMapper.apply(entry)))
            .collect(Collectors.toMap(Pair::getKey,
                entry -> CollectionUtils.toCollection(entry.getValue(), ArrayList.class)));
    }
Return environment info and app profiles for the service.

@author Misagh Moayyed
@since 7.3.0
core/cas-server-core-authentication-attributes/src/main/java/org/apereo/cas/services/ReturnEnvironmentAttributeReleasePolicy.java