### Question:
GuavaCollectors { public static <K, V> BiCollector<K, V, ImmutableSortedMap<K, V>> toImmutableSortedMap( Comparator<? super K> comparator, BinaryOperator<V> valueMerger) { requireNonNull(comparator); requireNonNull(valueMerger); return new BiCollector<K, V, ImmutableSortedMap<K, V>>() { @Override public <E> Collector<E, ?, ImmutableSortedMap<K, V>> splitting( Function<E, K> toKey, Function<E, V> toValue) { return ImmutableSortedMap.toImmutableSortedMap(comparator, toKey, toValue, valueMerger); } }; } private  GuavaCollectors(); static BiCollector<K, V, ImmutableMap<K, V>> toImmutableMap(); static BiCollector<K, V, ImmutableMap<K, V>> toImmutableMap(
      BinaryOperator<V> valueMerger); static Collector<V, ?, ImmutableMap<K, V>> indexingBy(
      Function<? super V, ? extends K> indexingFunction); static BiCollector<K, V1, ImmutableMap<K, V>> toImmutableMap(
      Collector<V1, ?, V> valueCollector); static BiCollector<K, V, ImmutableSortedMap<K, V>> toImmutableSortedMap(
      Comparator<? super K> comparator, BinaryOperator<V> valueMerger); static BiCollector<K, V, ImmutableSortedMap<K, V>> toImmutableSortedMap(
      Comparator<? super K> comparator); static BiCollector<K, V, M> toMultimap(
      Supplier<M> multimapSupplier); static BiCollector<K, V, ImmutableListMultimap<K, V>> toImmutableListMultimap(); static BiCollector<K, T, ImmutableListMultimap<K, V>> flatteningToImmutableListMultimap(
          Function<? super T, ? extends Stream<? extends V>> flattener); static BiCollector<K, V, ImmutableSetMultimap<K, V>> toImmutableSetMultimap(); static BiCollector<K, T, ImmutableSetMultimap<K, V>> flatteningToImmutableSetMultimap(
          Function<? super T, ? extends Stream<? extends V>> flattener); static BiCollector<K, V, ImmutableMultiset<K>> toImmutableMultiset(
      ToIntFunction<? super V> countFunction); static BiCollector<K, V, ImmutableBiMap<K, V>> toImmutableBimap(); static BiCollector<R, BiStream<? extends C, ? extends V>, ImmutableTable<R, C, V>> toImmutableTable();  }### Answer:
@Test public void testToImmutableSortedMap() { assertThat(BiStream.of(2, "two", 1, "one").collect(GuavaCollectors.toImmutableSortedMap(naturalOrder()))) .containsExactly(1, "one", 2, "two") .inOrder(); }
@Test public void testToImmutableSortedMap_withDuplicateKeys() { assertThat( BiStream.of(2, "two", 1, "one", 1, "uno") .collect(toImmutableSortedMap(naturalOrder(), (a, b) -> b))) .containsExactly(1, "uno", 2, "two") .inOrder(); }