private Counters syncTables(Configuration conf, TableName sourceTableName,
    TableName targetTableName, Path testDir, String... options) throws Exception {
    SyncTable syncTable = new SyncTable(conf);
    String[] args = Arrays.copyOf(options, options.length + 3);
    args[options.length] = testDir.toString();
    args[options.length + 1] = sourceTableName.getNameAsString();
    args[options.length + 2] = targetTableName.getNameAsString();
    int code = syncTable.run(args);
    assertEquals("sync table job failed", 0, code);

    LOG.info("Sync tables completed");
    return syncTable.counters;
  }
Basic test for the SyncTable M/R tool
hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestSyncTable.java