@Test
public void writeMatchedCitations() throws Exception {

    
    // given
    
    String path = "/path";
    
    doReturn(srcDocIdPicOutWritableRdd).when(srcDocIdPicOutRdd).mapToPair(Mockito.any());
    
    // execute
    
    coansysOutputWriter.writeMatchedCitations(srcDocIdPicOutRdd, path);
   
    // verify
    
    verify(srcDocIdPicOutWritableRdd).saveAsNewAPIHadoopFile(path, Text.class, BytesWritable.class, SequenceFileOutputFormat.class);
    verify(srcDocIdPicOutRdd).mapToPair(convertToWritableFunction.capture());
    assertConvertToWritableFunction(convertToWritableFunction.getValue());
}