@Test
public void testThemisRowCounter() throws Exception {

  if (TEST_UTIL != null) {
    writeTestData();
    Job job = ThemisRowCounter.createSubmittableJob(
      conf,
      new String[] { Bytes.toString(TABLENAME),
          Bytes.toString(FAMILY) + ":" + Bytes.toString(QUALIFIER) });
    job.waitForCompletion(true);
    assertTrue(job.isSuccessful());
    Counter counter = job.getCounters().findCounter(
      ThemisRowCounter.RowCounterMapper.Counters.ROWS);
    assertEquals(2, counter.getValue());
    job = ThemisRowCounter.createSubmittableJob(conf, new String[] { Bytes.toString(TABLENAME),
        Bytes.toString(ANOTHER_FAMILY) + ":" + Bytes.toString(QUALIFIER) });
    job.waitForCompletion(true);
    assertTrue(job.isSuccessful());
    counter = job.getCounters().findCounter(ThemisRowCounter.RowCounterMapper.Counters.ROWS);
    assertEquals(1, counter.getValue());
  }
}