public virtual void zipWithIndex() { Stream <string> letters = Stream.of("a", "b", "c"); IDictionary <int, string> expected = ImmutableMap.of(0, "a", 1, "b", 2, "c"); IDictionary <int, string> result = MapStream.zipWithIndex(letters).toMap(); assertThat(result).isEqualTo(expected); }