@Test
void customMimeHeaderUtf8_encodingFails() {

  String mimeNotAscii =
      "mime/tyࠒe"; // this is the SAMARITAN LETTER QUF u+0812 represented on 3 bytes
  assertThatIllegalArgumentException()
      .isThrownBy(
          () ->
              CompositeMetadataCodec.encodeMetadataHeader(
                  ByteBufAllocator.DEFAULT, mimeNotAscii, 0))
      .withMessage("custom mime type must be US_ASCII characters only");
}