@Test
void shouldCorrectlyEncodeData() {

  String username = "test";
  String password = "tset1234";
  int usernameLength = username.length();
  int passwordLength = password.length();
  ByteBuf byteBuf =
      AuthMetadataCodec.encodeSimpleMetadata(
          ByteBufAllocator.DEFAULT, username.toCharArray(), password.toCharArray());
  byteBuf.markReaderIndex();
  checkSimpleAuthMetadataEncoding(
      username, password, usernameLength, passwordLength, byteBuf.retain());
  byteBuf.resetReaderIndex();
  checkSimpleAuthMetadataEncodingUsingDecoders(
      username, password, usernameLength, passwordLength, byteBuf);
}