docs: @CanIgnoreReturnValue
    public Ordered containsExactlyEntriesIn(Multimap<?, ?> expectedMultimap) {
      checkNotNull(expectedMultimap, "expectedMultimap");
      ListMultimap<?, ?> missing = difference(expectedMultimap, actual());
      ListMultimap<?, ?> extra = difference(actual(), expectedMultimap);
  
      // TODO(kak): Possible enhancement: Include "[1 copy]" if the element does appear in
      // the subject but not enough times. Similarly for unexpected extra items.
      if (!missing.isEmpty()) {
        if (!extra.isEmpty()) {
          boolean addTypeInfo = hasMatchingToStringPair(missing.entries(), extra.entries());
          failWithoutActual(
              simpleFact(
                  lenientFormat(
                      "Not true that %s contains exactly <%s>. "
                          + "It is missing <%s> and has unexpected items <%s>",
                      actualAsString(),
                      annotateEmptyStringsMultimap(expectedMultimap),
                      // Note: The usage of countDuplicatesAndAddTypeInfo() below causes entries no
                      // longer to be grouped by key in the 'missing' and 'unexpected items' parts of
                      // the message (we still show the actual and expected multimaps in the standard
                      // format).
                      addTypeInfo
                          ? countDuplicatesAndAddTypeInfo(
                              annotateEmptyStringsMultimap(missing).entries())
                          : countDuplicatesMultimap(annotateEmptyStringsMultimap(missing)),
                      addTypeInfo
                          ? countDuplicatesAndAddTypeInfo(
                              annotateEmptyStringsMultimap(extra).entries())
                          : countDuplicatesMultimap(annotateEmptyStringsMultimap(extra)))));
          return ALREADY_FAILED;
        } else {
          failWithBadResults(
              "contains exactly",
              annotateEmptyStringsMultimap(expectedMultimap),
              "is missing",
              countDuplicatesMultimap(annotateEmptyStringsMultimap(missing)));
          return ALREADY_FAILED;
        }
      } else if (!extra.isEmpty()) {
        failWithBadResults(
            "contains exactly",
            annotateEmptyStringsMultimap(expectedMultimap),
            "has unexpected items",
            countDuplicatesMultimap(annotateEmptyStringsMultimap(extra)));
        return ALREADY_FAILED;
      }
  
      return new MultimapInOrder("contains exactly", expectedMultimap);
    }