@Override
    public Result preIncrement(final ObserverContext<? extends RegionCoprocessorEnvironment> e,
      final Increment increment) throws IOException {
      NavigableMap<byte[], List<Cell>> map = increment.getFamilyCellMap();
      for (Map.Entry<byte[], List<Cell>> entry : map.entrySet()) {
        for (Cell cell : entry.getValue()) {
          long incr =
            Bytes.toLong(cell.getValueArray(), cell.getValueOffset(), cell.getValueLength());
          if (incr == 10) {
            tr10 = increment.getTimeRange();
          } else if (incr == 2 && !increment.getTimeRange().isAllTime()) {
            tr2 = increment.getTimeRange();
          }
        }
      }
      return super.preIncrement(e, increment);
    }
This test runs batch mutation with Increments which have custom TimeRange. Custom Observer
records the TimeRange. We then verify that the recorded TimeRange has same bounds as the initial
TimeRange. See HBASE-15698
hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestIncrementTimeRange.java