private static byte[] incrementRow(byte[] row) {
    if (row.length == 0) {
      return new byte[] { '0' };
    }
    row[row.length - 1] = (byte) (((int) row[row.length - 1]) + 1);
    return row;
  }
Take last byte and add one to it.
hbase-server/src/test/java/org/apache/hadoop/hbase/master/janitor/TestCatalogJanitorCluster.java