@Test
  public void testIncrementWithTtlTags() throws Exception {
    LOG.info("Starting " + this.name.getMethodName());
    final TableName tableName =
      TableName.valueOf(filterStringSoTableNameSafe(this.name.getMethodName()));
    Table ht = TEST_UTIL.createTable(tableName, FAMILY);
    final byte[] COLUMN = Bytes.toBytes("column");

    Configuration conf = new Configuration(TEST_UTIL.getConfiguration());
    // Set RPC_CODEC_CONF_KEY to KeyValueCodecWithTags so that scan will return tags.
    conf.set(RPC_CODEC_CONF_KEY, KeyValueCodecWithTags.class.getName());
    conf.set(DEFAULT_CODEC_CLASS, "");
    try (Connection connection = ConnectionFactory.createConnection(conf);
      Table table = connection.getTable(tableName)) {
      for (int i = 0; i < 10; i++) {
        Increment inc = new Increment(ROW);
        inc.addColumn(FAMILY, COLUMN, 1);
        long ttl = i + 3600000;
        inc.setTTL(ttl);
        ht.increment(inc);

        Scan scan = new Scan().withStartRow(ROW);
        ResultScanner scanner = table.getScanner(scan);
        int count = 0;
        Result result;
        while ((result = scanner.next()) != null) {
          ExtendedCell[] cells = result.rawExtendedCells();
          for (ExtendedCell cell : cells) {
            List<Tag> tags = PrivateCellUtil.getTags(cell);
            // Make sure there is only 1 tag.
            assertEquals(1, tags.size());
            Tag tag = tags.get(0);
            assertEquals(TagType.TTL_TAG_TYPE, tag.getType());
            long ttlTagValue = Bytes.toLong(tag.getValueArray(), tag.getValueOffset());
            assertEquals(ttl, ttlTagValue);
          }
          count++;
        }
        // Make sure there is only 1 result.
        assertEquals(1, count);
      }
    }
  }
Call over to the adjacent class's method of same name.
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestIncrementsFromClientSide.java