@Test
  public void testWriteInputFile() throws IOException {
    TestOptions opts = new PerformanceEvaluation.TestOptions();
    final int clients = 10;
    opts.setNumClientThreads(clients);
    opts.setPerClientRunRows(10);
    Path dir =
      PerformanceEvaluation.writeInputFile(HTU.getConfiguration(), opts, HTU.getDataTestDir());
    FileSystem fs = FileSystem.get(HTU.getConfiguration());
    Path p = new Path(dir, PerformanceEvaluation.JOB_INPUT_FILENAME);
    long len = fs.getFileStatus(p).getLen();
    assertTrue(len > 0);
    byte[] content = new byte[(int) len];
    try (FSDataInputStream dis = fs.open(p)) {
      dis.readFully(content);
      BufferedReader br = new BufferedReader(
        new InputStreamReader(new ByteArrayInputStream(content), StandardCharsets.UTF_8));
      int count = 0;
      while (br.readLine() != null) {
        count++;
      }
      assertEquals(clients, count);
    }
  }
Exercise the mr spec writing. Simple assertions to make sure it is basically working.
hbase-diagnostics/src/test/java/org/apache/hadoop/hbase/TestPerformanceEvaluation.java