@Test
  public void testCreateResultWithCellArray() {
    Cell[] cells = genKVs(row, family, value, EnvironmentEdgeManager.currentTime(), 5);
    Result r = Result.create(cells);
    // the cells is actually a KeyValue[], which can be cast to ExtendedCell[] directly, so we
    // should get the same one without copying
    assertSame(cells, r.rawCells());

    Cell[] emptyCells = new Cell[0];
    Result emptyResult = Result.create(emptyCells);
    // emptyCells is a Cell[] instead of ExtendedCell[], so we need to copy it to a new array
    assertNotSame(emptyCells, emptyResult.rawCells());
  }
Microbenchmark that compares {@link Result#getValue} and {@link Result#loadValue} performance.
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResult.java