class AwsIDBrokerMappedRolePermissionValidator {

    SortedSet<String> getRoleArnsForUsers(Collection<String> users,
            Map<String, String> userMappings) {
        LOGGER.debug("Filter out specific users: {} from userMappings: {}", users, userMappings);
        return userMappings.entrySet().stream()
                .filter(m -> users.contains(m.getKey()))
                .map(Entry::getValue).collect(Collectors.toCollection(TreeSet::new));
    }

}