public static void doTestTimestampScanning(final Table incommon, final FlushCache flusher)
    throws IOException {
    // Add a couple of values for three different timestamps.
    put(incommon, T0);
    put(incommon, T1);
    put(incommon, HConstants.LATEST_TIMESTAMP);
    // Get count of latest items.
    int count = assertScanContentTimestamp(incommon, HConstants.LATEST_TIMESTAMP);
    // Assert I get same count when I scan at each timestamp.
    Assert.assertEquals(count, assertScanContentTimestamp(incommon, T0));
    Assert.assertEquals(count, assertScanContentTimestamp(incommon, T1));
    // Flush everything out to disk and then retry
    flusher.flushcache();
    Assert.assertEquals(count, assertScanContentTimestamp(incommon, T0));
    Assert.assertEquals(count, assertScanContentTimestamp(incommon, T1));
  }
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