private void assertUsageContent(String usage) {
    assertTrue(usage
      .contains("usage: hbase rowcounter " + "<tablename> [options] [<column1> <column2>...]"));
    assertTrue(usage.contains("Options:\n"));
    assertTrue(usage.contains(
      "--starttime=<arg>       " + "starting time filter to start counting rows from.\n"));
    assertTrue(usage.contains("--endtime=<arg>         "
      + "end time filter limit, to only count rows up to this timestamp.\n"));
    assertTrue(usage
      .contains("--range=<arg>           " + "[startKey],[endKey][;[startKey],[endKey]...]]\n"));
    assertTrue(usage.contains("--expectedCount=<arg>   expected number of rows to be count.\n"));
    assertTrue(
      usage.contains("For performance, " + "consider the following configuration properties:\n"));
    assertTrue(usage.contains("-Dhbase.client.scanner.caching=100\n"));
    assertTrue(usage.contains("-Dmapreduce.map.speculative=false\n"));
  }
Step 1: Add 10 rows(row1, row2, row3, row4, row5, row6, row7, row8, row9, row10) to a table.
Each row contains 1 column family and 4 columns and values for two different timestamps - 5 &
10.
<p>
Step 2: Delete the latest version of column A for row1. --> 1 X Delete
<p>
Step 3: Delete the cell for timestamp 5 of column B for row1. --> 1 X Delete
<p>
Step 4: Delete a column family for row2 and row4. --> 2 X DeleteFamily
<p>
Step 5: Delete all versions of a specific column for row3, row5 and row6. --> 3 X DeleteColumn
<p>
Step 6: Delete all columns for timestamp 5 for row 7. --> 1 X DeleteFamilyVersion
<p>
Case 1: Run row counter without countDeleteMarkers and validate counter values.
<p>
Case 2: Run row counter with countDeleteMarkers flag and validate counter values.
<p>
Case 3: Run row counter with countDeleteMarkers flag for a row range and validate counter
values.
hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestRowCounter.java