@Test
void shouldThrowIfWellKnownAuthTypeIsUnsupportedOrUnknown() {

  ByteBuf buffer = ByteBufAllocator.DEFAULT.buffer();
  Assertions.assertThatThrownBy(
          () ->
              AuthMetadataCodec.encodeMetadata(
                  ByteBufAllocator.DEFAULT, WellKnownAuthType.UNPARSEABLE_AUTH_TYPE, buffer))
      .hasMessage("only allowed AuthType should be used");
  Assertions.assertThatThrownBy(
          () ->
              AuthMetadataCodec.encodeMetadata(
                  ByteBufAllocator.DEFAULT, WellKnownAuthType.UNPARSEABLE_AUTH_TYPE, buffer))
      .hasMessage("only allowed AuthType should be used");
  buffer.release();
}