@Override
    public void writeRecord(Tuple2<K, V> record) throws IOException {
        try {
            this.recordWriter.write(record.f0, record.f1);
        } catch (InterruptedException e) {
            throw new IOException("Could not write Record.", e);
        }
    }
@Test
    void testWriteRecord() throws Exception {

        RecordWriter<String, Long> recordWriter = mock(DummyRecordWriter.class);
        HadoopOutputFormat<String, Long> hadoopOutputFormat =
                setupHadoopOutputFormat(
                        new DummyOutputFormat(),
                        Job.getInstance(),
                        recordWriter,
                        null,
                        new Configuration());

        hadoopOutputFormat.writeRecord(new Tuple2<String, Long>());

        verify(recordWriter, times(1)).write(nullable(String.class), nullable(Long.class));
    }