code: @SuppressWarnings({ "unchecked", "rawtypes" })
      public void run(List<?> input, List<Record> output, boolean stdout)
              throws InstantiationException, IllegalAccessException, ClassNotFoundException, IOException, URISyntaxException {
          if (input == null || input.isEmpty()) {
              fail("input is empty");
          }
  
          List<Pair<WritableComparable, Writable>> actual = null;
          Object o = input.get(0);
          if (o instanceof String) {
              actual = runString((List<String>) input);
          } else if (o instanceof Record) {
              actual = runRecord((List<Record>) input);
          } else {
              fail("input object is miss match");
          }
  
          if (stdout) {
              for (Pair<WritableComparable, Writable> pair : actual) {
                  System.out.println(pair);
              }
          }
  
          assertEquals(output.size(), actual.size());
  
          if (output != null) {
              for (int i = 0; i < output.size(); i++) {
                  Pair<WritableComparable, Writable> pair = actual.get(i);
                  Record r = output.get(i);
                  String s = String.format(OUTPUT, r.getKey().toString(),
                                                   r.getValue().toString());
                  assertEquals(s, pair.toString());
              }
          }
      }
docs: Run the test with this method.
  @param input input {@link String} {@link List} or {@link Record} {@link List}
  @param output result of {@link Record} {@link List}
  @param stdout whether to output the execution results to stdout.
  @throws InstantiationException
  @throws IllegalAccessException
  @throws ClassNotFoundException
  @throws IOException
  @throws URISyntaxException