class AwsIDBrokerMappedRolePermissionValidator {

    List<Policy> getPolicies(List<String> policyFileNames,
            Map<String, String> replacements) {
        List<Policy> policies = new ArrayList<>(policyFileNames.size());
        for (String policyFileName : policyFileNames) {
            Policy policy = awsIamService.getPolicy(policyFileName, replacements);
            if (policy != null) {
                policies.add(policy);
            }
        }
        return policies;
    }

}