TEST_F(EncryptedRecordTest, TestWriteHandshake) {
  TLSMessage msg{ContentType::handshake, getBuf("1234567890")};
  EXPECT_CALL(*writeAead_, _encrypt(_, _, 0))
      .WillOnce(Invoke([](std::unique_ptr<IOBuf>& buf, const IOBuf*, uint64_t) {
        expectSame(buf, "123456789016");
        return getBuf("abcd1234abcd");
      }));
  auto buf = write_.write(std::move(msg));
  expectSame(buf.data, "1703030006abcd1234abcd");
}
TEST_F(EncryptedRecordTest, TestWriteHandshake) {
  TLSMessage msg{ContentType::handshake, getBuf("1234567890")};
  EXPECT_CALL(*writeAead_, _encrypt(_, _, 0))
      .WillOnce(Invoke([](std::unique_ptr<IOBuf>& buf, const IOBuf*, uint64_t) {
        expectSame(buf, "123456789016");
        return getBuf("abcd1234abcd");
      }));
  auto buf = write_.write(std::move(msg));
  expectSame(buf.data, "1703030006abcd1234abcd");
}