@Test
void shouldThrowOnNonASCIIChars() {

  ByteBuf testSecurityPayload = ByteBufAllocator.DEFAULT.buffer();
  String customAuthType = "1234567#4? 𠜎𠜱𠝹𠱓𠱸𠲖𠳏𠳕𠴕𠵼𠵿𠸎";
  Assertions.assertThatThrownBy(
          () ->
              AuthMetadataCodec.encodeMetadata(
                  ByteBufAllocator.DEFAULT, customAuthType, testSecurityPayload))
      .hasMessage("custom auth type must be US_ASCII characters only");
}