@Test
  public void testParseOptsValueRandom() {
    Queue<String> opts = new LinkedList<>();
    String cmdName = "sequentialWrite";
    opts.offer("--valueRandom");
    opts.offer("--valueZipf");
    opts.offer(cmdName);
    opts.offer("64");
    PerformanceEvaluation.TestOptions options = null;
    try {
      options = PerformanceEvaluation.parseOpts(opts);
      fail("should fail");
    } catch (IllegalStateException e) {
      System.out.println(e.getMessage());
    }

    opts = new LinkedList<>();
    opts.offer("--valueRandom");
    opts.offer(cmdName);
    opts.offer("64");

    options = PerformanceEvaluation.parseOpts(opts);

    assertNotNull(options);
    assertNotNull(options.getCmdName());
    assertEquals(cmdName, options.getCmdName());
    assertEquals(true, options.valueRandom);
  }
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