class ImaAcceptablePathAndHashRecordMatcher extends ImaRecordMatcher<IMABaselineRecord> {

    @Override
    public IMAMatchStatus<IMABaselineRecord> contains(final IMAMeasurementRecord record) {
        Preconditions.checkArgument(record != null, "Cannot match on null record.");

        final Set<IMABaselineRecord> matchRecords = new HashSet<>();
        final Set<IMABaselineRecord> mismatchRecords = new HashSet<>();

        final Collection<IMABaselineRecord> matchingRecords = getRelatedBaselineRecordsByPath(
                record
        );

        for (IMABaselineRecord baselineRecord : matchingRecords) {
            compareDigestsAndPopulateMatchLists(
                    baselineRecord, record, matchRecords, mismatchRecords
            );
        }

        if (matchRecords.isEmpty() && mismatchRecords.isEmpty()) {
            return new IMAMatchStatus<>(record, ReportMatchStatus.UNKNOWN, getImaBaseline());
        }

        if (matchRecords.isEmpty()) {
            return new IMAMatchStatus<>(
                    record, ReportMatchStatus.MISMATCH, mismatchRecords, getImaBaseline()
            );
        }

        return new IMAMatchStatus<>(
                record,
                ReportMatchStatus.MATCH,
                matchRecords,
                getImaBaseline()
        );
    }

    public  ImaAcceptablePathAndHashRecordMatcher(
            final Collection<IMABaselineRecord> records,
            final IMAPolicy imaPolicy,
            final ImaBaseline imaBaseline);

}