### Question:
Zip { public static <T, U> Stream<Pair<T, U>> stream(Stream<T> first, Stream<U> second) { assertNotNull(first, second); return streamInternal(first.iterator(), second.iterator()); }  static Stream<Pair<T, U>> stream(Stream<T> first, Stream<U> second); static Stream<Pair<T, U>> stream(Iterable<T> first, Iterable<U> second); static Stream<Pair<T, U>> streamInternal(Iterator<T> first, Iterator<U> second);  }### Answer:
@Test void stream() { List<String> a = Arrays.asList("a", "b", "c"); List<Integer> b = Arrays.asList(1, 2, 3, 4, 5); List<Pair<String, Integer>> result = Zip.stream(a, b).collect(toList()); assertEquals(3, result.size()); assertEquals("a", result.get(0).fst); assertEquals(Integer.valueOf(1), result.get(0).snd); assertEquals("b", result.get(1).fst); assertEquals(Integer.valueOf(2), result.get(1).snd); assertEquals("c", result.get(2).fst); assertEquals(Integer.valueOf(3), result.get(2).snd); }