// Path: mug/src/test/java/com/google/mu/util/stream/IterationTest.java
// static <T> Node<T> tree(T value) {
//   return new Node<>(value);
// }


import static com.google.common.truth.Truth8.assertThat;
import static com.google.mu.util.stream.IterationTest.Tree.tree;
import static org.junit.jupiter.api.Assertions.assertThrows;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Stream;
import org.junit.Test;
import com.google.common.testing.ClassSanityTester;
/*****************************************************************************
 * ------------------------------------------------------------------------- *
 * 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;





public class IterationTest {
  @Test public void iteration_empty() {
    assertThat(new Iteration<Object>().iterate()).isEmpty();
  }

  @Test public void yield_eagerElements() {
    assertThat(new Iteration<>().yield(1).yield(2).iterate()).containsExactly(1, 2).inOrder();
  }

  @Test public void preOrder_deep() {
// Path: mug/src/test/java/com/google/mu/util/stream/IterationTest.java
// static <T> Node<T> tree(T value) {
//   return new Node<>(value);
// }


// Path: mug/src/test/java/com/google/mu/util/stream/IterationTest.java
import static com.google.common.truth.Truth8.assertThat;
import static com.google.mu.util.stream.IterationTest.Tree.tree;
import static org.junit.jupiter.api.Assertions.assertThrows;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Stream;
import org.junit.Test;
import com.google.common.testing.ClassSanityTester;

/*****************************************************************************
 * ------------------------------------------------------------------------- *
 * 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;





public class IterationTest {
  @Test public void iteration_empty() {
    assertThat(new Iteration<Object>().iterate()).isEmpty();
  }

  @Test public void yield_eagerElements() {
    assertThat(new Iteration<>().yield(1).yield(2).iterate()).containsExactly(1, 2).inOrder();
  }

  @Test public void preOrder_deep() {
    Tree<String> tree = tree("a")