@Test public void testFlatMapping_toStream() {

  BiStream<String, Integer> salaries = BiStream.of("Joe", 1, "Tom", 2);
  assertThat(salaries.collect(BiCollectors.flatMapping((k, c) -> nCopies(c, k).stream(), toList())))
      .containsExactly("Joe", "Tom", "Tom")
      .inOrder();
}