@Test
public void testConfigure() throws ClassNotFoundException, IOException {

  final Path filePath = new Path("foo/bar");
  final int numSplits = 42;
  final Class<? extends OutputFormat> outputFormatClass = TextOutputFormat.class;
  FileMapReduceJobOutput jobOutput = new ConcreteFileMapReduceJobOutput(
      filePath, numSplits, outputFormatClass);
  Job job = new Job();
  jobOutput.configure(job);
  // The output format class should be set in the job configuration.
  assertEquals(outputFormatClass, job.getOutputFormatClass());
  // The file output path should be set in the job configuration.
  assert(FileOutputFormat.getOutputPath(job).toString().endsWith(filePath.toString()));
  // The number of reduce tasks should be set to the number of splits.
  assertEquals(numSplits, job.getNumReduceTasks());
}