@Test
  public void testOptimizeAndGet() throws IOException {
    // First test a Get of two columns in the row R2. Every Get is a Scan. Get columns named
    // R2 and R3.
    Get get = new Get(TWO);
    get.addColumn(CF, TWO);
    get.addColumn(CF, THREE);
    Scan scan = new Scan(get);
    try (CellGridStoreScanner scanner = new CellGridStoreScanner(scan, this.scanInfo)) {
      List<Cell> results = new ArrayList<>();
      // For a Get there should be no more next's after the first call.
      assertEquals(false, scanner.next(results));
      // Should be one result only.
      assertEquals(2, results.size());
      // And we should have gone through optimize twice only.
      assertEquals("First qcode is SEEK_NEXT_COL and second INCLUDE_AND_SEEK_NEXT_ROW", 3,
        scanner.count.get());
      assertEquals("Memstore Read count should be", 1, scanner.memstoreOnlyReads);
    }
  }
Ensure the optimize Scan method in StoreScanner does not get in the way of a Get doing minimum
work... seeking to start of block and then SKIPPING until we find the wanted Cell. This
'simple' scenario mimics case of all Cells fitting inside a single HFileBlock. See HBASE-15392.
This test is a little cryptic. Takes a bit of staring to figure what it up to.
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreScanner.java