@Test
void shouldEncodeCustomAuth() {

  String payloadAsAText = "testsecuritybuffer";
  ByteBuf testSecurityPayload =
      Unpooled.wrappedBuffer(payloadAsAText.getBytes(CharsetUtil.UTF_8));
  String customAuthType = "myownauthtype";
  ByteBuf buffer =
      AuthMetadataCodec.encodeMetadata(
          ByteBufAllocator.DEFAULT, customAuthType, testSecurityPayload);
  checkCustomAuthMetadataEncoding(testSecurityPayload, customAuthType, buffer);
}