// Path: mug/src/main/java/com/google/mu/function/BiComparator.java
// static <K, T extends Comparable<T>> BiComparator<K, Object> comparingKey(
//     Function<? super K, ? extends T> function) {
//   return comparingKey(function, naturalOrder());
// }
// 
// Path: mug/src/main/java/com/google/mu/function/BiComparator.java
// static <V, T extends Comparable<T>> BiComparator<Object, V> comparingValue(
//     Function<? super V, ? extends T> function) {
//   return comparingValue(function, naturalOrder());
// }
// 
// Path: mug/src/test/java/com/google/mu/util/stream/BiStreamTest.java
// static<K,V> MultimapSubject assertKeyValues(BiStream<K, V> stream) {
//   Multimap<?, ?> multimap = stream.collect(new BiCollector<K, V, Multimap<K, V>>() {
//     @Override
//     public <E> Collector<E, ?, Multimap<K, V>> splitting(Function<E, K> toKey, Function<E, V> toValue) {
//       return BiStreamTest.toLinkedListMultimap(toKey,toValue);
//     }
//   });
//   return assertThat(multimap);
// }


import static com.google.mu.function.BiComparator.comparingKey;
import static com.google.mu.function.BiComparator.comparingValue;
import static com.google.mu.util.stream.BiStreamTest.assertKeyValues;
import static java.util.Comparator.naturalOrder;
import java.util.Comparator;
import java.util.function.Function;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import com.google.common.collect.ImmutableMultimap;
/*****************************************************************************
 * ------------------------------------------------------------------------- *
 * Licensed under the Apache License, Version 2.0 (the "License");           *
 * you may not use this file except in compliance with the License.          *
 * You may obtain a copy of the License at                                   *
 *                                                                           *
 * http://www.apache.org/licenses/LICENSE-2.0                                *
 *                                                                           *
 * Unless required by applicable law or agreed to in writing, software       *
 * distributed under the License is distributed on an "AS IS" BASIS,         *
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  *
 * See the License for the specific language governing permissions and       *
 * limitations under the License.                                            *
 *****************************************************************************/
package com.google.mu.util.stream;





@RunWith(JUnit4.class)
public class BiStreamCompoundTest {

  @Test public void testMappedValuesAndSortedByKeys() {
// Path: mug/src/main/java/com/google/mu/function/BiComparator.java
// static <K, T extends Comparable<T>> BiComparator<K, Object> comparingKey(
//     Function<? super K, ? extends T> function) {
//   return comparingKey(function, naturalOrder());
// }
// 
// Path: mug/src/main/java/com/google/mu/function/BiComparator.java
// static <V, T extends Comparable<T>> BiComparator<Object, V> comparingValue(
//     Function<? super V, ? extends T> function) {
//   return comparingValue(function, naturalOrder());
// }
// 
// Path: mug/src/test/java/com/google/mu/util/stream/BiStreamTest.java
// static<K,V> MultimapSubject assertKeyValues(BiStream<K, V> stream) {
//   Multimap<?, ?> multimap = stream.collect(new BiCollector<K, V, Multimap<K, V>>() {
//     @Override
//     public <E> Collector<E, ?, Multimap<K, V>> splitting(Function<E, K> toKey, Function<E, V> toValue) {
//       return BiStreamTest.toLinkedListMultimap(toKey,toValue);
//     }
//   });
//   return assertThat(multimap);
// }


// Path: mug/src/test/java/com/google/mu/util/stream/BiStreamCompoundTest.java
import static com.google.mu.function.BiComparator.comparingKey;
import static com.google.mu.function.BiComparator.comparingValue;
import static com.google.mu.util.stream.BiStreamTest.assertKeyValues;
import static java.util.Comparator.naturalOrder;
import java.util.Comparator;
import java.util.function.Function;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import com.google.common.collect.ImmutableMultimap;

/*****************************************************************************
 * ------------------------------------------------------------------------- *
 * Licensed under the Apache License, Version 2.0 (the "License");           *
 * you may not use this file except in compliance with the License.          *
 * You may obtain a copy of the License at                                   *
 *                                                                           *
 * http://www.apache.org/licenses/LICENSE-2.0                                *
 *                                                                           *
 * Unless required by applicable law or agreed to in writing, software       *
 * distributed under the License is distributed on an "AS IS" BASIS,         *
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  *
 * See the License for the specific language governing permissions and       *
 * limitations under the License.                                            *
 *****************************************************************************/
package com.google.mu.util.stream;





@RunWith(JUnit4.class)
public class BiStreamCompoundTest {

  @Test public void testMappedValuesAndSortedByKeys() {
    assertKeyValues(