@Test public void testFlatMapping_toBiStream() {

  BiStream<String, Integer> salaries = BiStream.of("Joe", 1, "Tom", 2);
  ImmutableListMultimap<String, Integer> result = salaries.collect(
      BiCollectors.flatMapping(
          (String k, Integer c) -> biStream(nCopies(c, k)).mapValues(u -> c),
          ImmutableListMultimap::toImmutableListMultimap));
  assertThat(result)
      .containsExactly("Joe", 1, "Tom", 2, "Tom", 2)
      .inOrder();
}