class MatchStateValidator extends AbstractComplianceChecker {

    @Override
    public IPolicyEvaluation evaluate(Collection<Artifact> artifacts) {
        DefaultPolicyEvaluation policyEvaluation = new DefaultPolicyEvaluation();
        artifacts.stream()
                .filter(artifact -> !artifact.getFlag(Artifact.IS_PROPRIETARY_FLAG_KEY))
                .forEach(artifact -> {
                    final Optional<ArtifactMatchingMetadata> artifactMatchingMetadata = artifact.askFor(ArtifactMatchingMetadata.class);
                    if(! artifactMatchingMetadata.isPresent()) {
                        return;
                    }
                    MatchState artifactsMatchState = artifactMatchingMetadata.get().getMatchState();
                    if (MatchState.SIMILAR.equals(artifactsMatchState)) {
                        policyEvaluation.addEvaluationResult("MatchStateValidator::rule", "The match State is SIMILAR", SIMILAR_Severity, artifact);
                    }else if (MatchState.UNKNOWN.equals(artifactsMatchState)) {
                        policyEvaluation.addEvaluationResult("MatchStateValidator::rule", "The match State is UNKNOWN", UNKNOWN_Severity, artifact);
                    }
                });
        return policyEvaluation;
    }

    public  MatchStateValidator();

}