@Test
public void allPairs() {

    ProcedureConfiguration configuration = ProcedureConfiguration.create(MapUtil.map("concurrency", concurrency));
    SimilarityStreamGenerator<CategoricalInput> generator = new SimilarityStreamGenerator<>(terminationFlag(), configuration, DECODER, ALL_PAIRS_COMPUTER);
    CategoricalInput[] ids = new CategoricalInput[3];
    ids[0] = new CategoricalInput(0, new long[]{});
    ids[1] = new CategoricalInput(1, new long[]{});
    ids[2] = new CategoricalInput(2, new long[]{});
    Stream<SimilarityResult> stream = generator.stream(ids, -1.0, 0);
    List<SimilarityResult> rows = stream.collect(Collectors.toList());
    assertEquals(3, rows.size());
    assertThat(rows, hasItems(similarityResult(0, 1, true, false)));
    assertThat(rows, hasItems(similarityResult(0, 2, true, false)));
    assertThat(rows, hasItems(similarityResult(1, 2, true, false)));
}