@Test
public void hashEntity() {

    
    // given
    
    MatchableEntity entity = mock(MatchableEntity.class);
    when(entity.id()).thenReturn("12");
    
    @SuppressWarnings("unchecked")
    scala.collection.Iterable<String> iterable = mock(scala.collection.Iterable.class);
    
    Mockito.when(hashGenerator.generate(entity)).thenReturn(iterable);
    
    List<String> hashes = Lists.newArrayList("XXX", "ZZZ");
    when(scalaIterableConverter.convertToJavaIterable(iterable)).thenReturn(hashes);
    
    // execute
    
    List<Tuple2<String, String>> hashIdPairs = matchableEntityHasher.hashEntity(entity);
    
    // assert
    
    assertEquals(2, hashIdPairs.size());
    assertEquals(new Tuple2<>("XXX", "12"), hashIdPairs.get(0));
    assertEquals(new Tuple2<>("ZZZ", "12"), hashIdPairs.get(1));
    
}