public static int assertScanContentTimestamp(final Table in, final long ts) throws IOException {
    Scan scan = new Scan().withStartRow(HConstants.EMPTY_START_ROW);
    scan.addFamily(FAMILY_NAME);
    scan.setTimeRange(0, ts);
    ResultScanner scanner = in.getScanner(scan);
    int count = 0;
    try {
      // TODO FIX
      // HStoreKey key = new HStoreKey();
      // TreeMap<byte [], Cell>value =
      // new TreeMap<byte [], Cell>(Bytes.BYTES_COMPARATOR);
      // while (scanner.next(key, value)) {
      // assertTrue(key.getTimestamp() <= ts);
      // // Content matches the key or HConstants.LATEST_TIMESTAMP.
      // // (Key does not match content if we 'put' with LATEST_TIMESTAMP).
      // long l = Bytes.toLong(value.get(COLUMN).getValue());
      // assertTrue(key.getTimestamp() == l ||
      // HConstants.LATEST_TIMESTAMP == l);
      // count++;
      // value.clear();
      // }
    } finally {
      scanner.close();
    }
    return count;
  }
Tests user specifiable time stamps putting, getting and scanning. Also tests same in presence of
deletes. Test cores are written so can be run against an HRegion and against an HTable: i.e. both
local and remote.
hbase-server/src/test/java/org/apache/hadoop/hbase/TimestampTestBase.java