@Test
public void writeMatchedCitations() throws Exception {

    
    // given
    
    doReturn(mappedMatchedCitations).when(matchedCitations).mapToPair(any());
    
    
    // execute
    
    outputWriter.writeMatchedCitations(matchedCitations, "/output/path");
    
    
    // assert
    
    verify(matchedCitations).mapToPair(mapToWritableFunction.capture());
    assertMapToWritableFunction(mapToWritableFunction.getValue());
    
    verify(mappedMatchedCitations).saveAsNewAPIHadoopFile("/output/path", TextWithBytesWritable.class,
            Text.class, SequenceFileOutputFormat.class);
}