@Test
void customMimeHeaderLatin1_encodingFails() {

  String mimeNotAscii = "mime/typé";
  assertThatIllegalArgumentException()
      .isThrownBy(
          () ->
              CompositeMetadataCodec.encodeMetadataHeader(
                  ByteBufAllocator.DEFAULT, mimeNotAscii, 0))
      .withMessage("custom mime type must be US_ASCII characters only");
}