@Override
    public void map(LongWritable key, Text value, Context context)
        throws IOException, InterruptedException {
      try {
        HCatRecord rec = writeRecords.get(writeCount);
        context.write(null, rec);
        writeCount++;
      } catch (Exception e) {
        // Print since otherwise exception is lost.
        e.printStackTrace(System.err);
        throw new IOException(e);
      }
    }
Test constructor that sets the storage format class names provided by the test parameter.
hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/HCatMapReduceTest.java