private String findSharedDigestKey(List<Metadata> metadataListA, List<Metadata> metadataListB) {
        if (metadataListB == null || metadataListB.size() == 0) {
            return null;
        }
        Set<String> digestA = new HashSet<>();
        if (metadataListA != null && metadataListA.size() > 0) {
            for (String n : metadataListA
                    .get(0)
                    .names()) {
                if (n.startsWith(DIGEST_KEY_PREFIX)) {
                    digestA.add(n);
                }
            }
        }
        Metadata bMain = metadataListB.get(0);
        for (String n : bMain.names()) {
            if (digestA.contains(n)) {
                return n;
            }
        }
        return null;
    }
Checks only the first item in each list. Returns the first
digest key shared by both, if it exists, null otherwise.

@param metadataListA
@param metadataListB
@return
tika-eval/tika-eval-app/src/main/java/org/apache/tika/eval/app/ExtractComparer.java