@Test
  public void testScannerReseekDoesntNPE() throws Exception {
    List<KeyValueScanner> scanners = scanFixture(kvs);
    try (StoreScanner scan = new StoreScanner(new Scan(), scanInfo, getCols("a", "d"), scanners)) {
      // Previously a updateReaders twice in a row would cause an NPE. In test this would also
      // normally cause an NPE because scan.store is null. So as long as we get through these
      // two calls we are good and the bug was quashed.
      scan.updateReaders(Collections.emptyList(), Collections.emptyList());
      scan.updateReaders(Collections.emptyList(), Collections.emptyList());
      scan.peek();
    }
  }
Ensure that optimize does not cause the Get to do more seeking than required. Optimize (see
HBASE-15392) was causing us to seek all Cells in a block when a Get Scan if the next block
index/start key was a different row to the current one. A bug. We'd call next too often because
we had to exhaust all Cells in the current row making us load the next block just to discard
what we read there. 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