@Test
public void readCitations() throws Exception {

    
    // given
    
    doReturn(citationsWritable).when(sparkContext).sequenceFile("/path/to/citations/", Text.class, BytesWritable.class);
    doReturn(citations).when(citationsWritable).mapToPair(any());
    
    
    // execute
    
    JavaPairRDD<String, MatchableEntity> retCitations = inputReader.readCitations(sparkContext, "/path/to/citations/");
    
    
    // assert
    
    assertTrue(retCitations == citations);
    
    verify(sparkContext).sequenceFile("/path/to/citations/", Text.class, BytesWritable.class);
    verify(citationsWritable).mapToPair(mapToEntityFunction.capture());
    assertMapToEntityFunction(mapToEntityFunction.getValue());
    
}