@Test
public void convertToPicOut() {


    // given
    
    Reference ref1 = createReference(1, "X");
    Reference ref2 = createReference(2, "C");
    Reference ref3 = createReference(3, "Z");
    List<Reference> refs = Lists.newArrayList(ref1, ref2, ref3);
    Tuple2<String, Iterable<Reference>> srcDocIdReferences = new Tuple2<>("XYZ", refs);
    
    
    // execute
    
    Tuple2<String, PicOut> srcDocIdPicOut = referenceToPicOutConverter.convertToPicOut(srcDocIdReferences);
    
    
    // assert
    
    assertEquals(srcDocIdPicOut._1(), "XYZ");
    assertEquals(srcDocIdPicOut._2().getDocId(), "XYZ");
    assertEquals(srcDocIdPicOut._2().getRefsCount(), refs.size());
    assertTrue(srcDocIdPicOut._2().getRefs(0) == ref1);
    assertTrue(srcDocIdPicOut._2().getRefs(1) == ref2);
    assertTrue(srcDocIdPicOut._2().getRefs(2) == ref3);
    
}