@Test
  public void testIndexesScanWithOneDeletedRow() throws IOException {
    byte[] family = Bytes.toBytes("family");

    // Setting up region
    this.region = initHRegion(tableName, method, CONF, family);
    Put put = new Put(Bytes.toBytes(1L));
    put.addColumn(family, qual1, 1L, Bytes.toBytes(1L));
    region.put(put);

    region.flush(true);

    Delete delete = new Delete(Bytes.toBytes(1L), 1L);
    region.delete(delete);

    put = new Put(Bytes.toBytes(2L));
    put.addColumn(family, qual1, 2L, Bytes.toBytes(2L));
    region.put(put);

    Scan idxScan = new Scan();
    idxScan.addFamily(family);
    idxScan.setFilter(new FilterList(FilterList.Operator.MUST_PASS_ALL,
      Arrays.<Filter> asList(
        new SingleColumnValueFilter(family, qual1, CompareOperator.GREATER_OR_EQUAL,
          new BinaryComparator(Bytes.toBytes(0L))),
        new SingleColumnValueFilter(family, qual1, CompareOperator.LESS_OR_EQUAL,
          new BinaryComparator(Bytes.toBytes(3L))))));
    try (InternalScanner scanner = region.getScanner(idxScan)) {
      List<Cell> res = new ArrayList<>();

      while (scanner.next(res)) {
        // Ignore res value.
      }
      assertEquals(1L, res.size());
    }
  }
Writes very wide records and gets the latest row every time.. Flushes and compacts the region
aggressivly to catch issues. by flush / scan / compaction when joining threads
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java