private static String makeUnexpectedImageDigestWarning(
      DescriptorDigest expectedDigest, List<String> receivedDigests) {
    if (receivedDigests.isEmpty()) {
      return "Expected image digest " + expectedDigest + ", but received none";
    }

    StringJoiner message =
        new StringJoiner(", ", "Expected image digest " + expectedDigest + ", but received: ", "");
    for (String receivedDigest : receivedDigests) {
      message.add(receivedDigest);
    }
    return message.toString();
  }
Makes the warning for when the registry responds with an image digest that is not the expected
digest of the image.

@param expectedDigest the expected image digest
@param receivedDigests the received image digests
@return the warning message
jib-core/src/main/java/com/google/cloud/tools/jib/registry/ManifestPusher.java