ForwardingBigQueryFileOutputFormat extends OutputFormat<K, V> { @Override public RecordWriter<K, V> getRecordWriter(TaskAttemptContext context) throws IOException, InterruptedException { Configuration conf = context.getConfiguration(); return getDelegate(conf).getRecordWriter(context); }  @Override void checkOutputSpecs(JobContext job); @Override synchronized OutputCommitter getOutputCommitter(TaskAttemptContext context); @Override RecordWriter<K, V> getRecordWriter(TaskAttemptContext context);  }
@Test public void testGetRecordWriter() throws Exception { RecordWriter<Text, Text> recordWriter = outputFormat.getRecordWriter(mockTaskAttemptContext); assertThat(recordWriter).isEqualTo(mockRecordWriter); verify(mockFileOutputFormat).getRecordWriter(eq(mockTaskAttemptContext)); }