### Question:
Index { public <R> Stream<T2<Optional<L>, R>> rightOuterJoin(Index<K, R> other) { return matchAndMerge(other, rightOuterJoinMerger()); } private  Index(Comparator<? super K> comparator, SortedMap<K, Set<L>> indexed); static Index<K, L> on(Stream<? extends L> stream, Function<? super L, ? extends K> key); static Index<K, L> on(Stream<? extends L> stream, Function<? super L, ? extends K> key, Comparator<? super K> comparator); Spliterator<Map.Entry<K, Set<L>>> entrySpliterator(); Set<K> keys(); Stream<T2<L, Set<R>>> oneToMany(Index<K, R> other); Stream<T2<L, Set<R>>> strictOneToMany(Index<K, R> other); Stream<T2<L, R>> manyToOne(Index<K, R> other); Stream<T2<L, R>> strictManyToOne(Index<K, R> other); Stream<T2<L, R>> strictOneToOne(Index<K, R> other); Stream<T2<L, Optional<R>>> leftOuterJoin(Index<K, R> other); Stream<T2<Optional<L>, R>> rightOuterJoin(Index<K, R> other); Stream<T2<L, R>> innerJoin(Index<K, R> other); Stream<T2<Optional<L>, Optional<R>>> outerJoin(Index<K, R> other); @Override String toString();  }### Answer:
@Test public void rightOuterJoin() { Index<Character, String> left = Index.on(Stream.of("carrot", "banana", "apple"), indexOnFirstChar); Index<Character, String> right = Index.on(Stream.of("catamorphism", "banausic", "ballistic", "dirigible"), indexOnFirstChar); assertThat(left.rightOuterJoin(right).collect(Collectors.toList()), hasItems( T2.of(Optional.of("banana"), "banausic"), T2.of(Optional.of("banana"), "ballistic"), T2.of(Optional.of("carrot"), "catamorphism"), T2.of(Optional.empty(), "dirigible"))); }