@Test
  public void TestCellCounterWithoutOutputDir() throws Exception {
    String[] args = new String[] { "tableName" };
    assertEquals("CellCounter should exit with -1 as output directory is not specified.", -1,
      ToolRunner.run(HBaseConfiguration.create(), new CellCounter(), args));
  }
Test CellCounter for complete table all data should print to output
hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestCellCounter.java