CorcRecordWriter implements RecordWriter<NullWritable, Corc> { @Override public void close(Reporter reporter) throws IOException { writer.close(reporter); } CorcRecordWriter(RecordWriter<NullWritable, ?> writer); @SuppressWarnings("unchecked") @Override void write(NullWritable key, Corc value); @Override void close(Reporter reporter);  }
@SuppressWarnings("unchecked") @Test public void decoratedWriterClose() throws IOException { CorcRecordWriter corcRecordWriter = new CorcRecordWriter(writer); Reporter reporter = mock(Reporter.class); corcRecordWriter.close(reporter); verify(writer).close(reporter); }