@Test
  public void testRecordSizeIsNotRecalculatedAfterFirstCall() {
    Record emptyRecord = new Record();
    Assert.assertEquals(EMPTY_RECORD_ESTIMATED_SIZE_BYTES, emptyRecord.getEstimatedSizeInMemoryBytes());

    emptyRecord.setPlan("asdfghjk");
    // size is not changed, current implementation strictly calculates it only once after adding it to the queue of
    // records to be persisted
    Assert.assertEquals(EMPTY_RECORD_ESTIMATED_SIZE_BYTES, emptyRecord.getEstimatedSizeInMemoryBytes());
  }
This test is crucial for ensuring that unit tests using DummyRecord have coverage on all fields.
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/queryhistory/schema/TestQueryHistoryRecord.java