// Path: src/main/java/javafixes/common/StreamUtil.java
// public class StreamUtil {
// 
//     public static <T> Stream<T> toStream(Iterable<T> iterable) {
//         return StreamSupport.stream(iterable.spliterator(), false);
//     }
// 
//     public static <T> Stream<T> toStream(Iterator<T> iterator) {
//         return toStream(() -> iterator);
//     }
// }
// 
// Path: src/main/java/javafixes/collection/CollectionUtil.java
// @SafeVarargs
// public static <T> ArrayList<T> newList(T... values) {
//     ArrayList<T> list = new ArrayList<T>(values.length);
//     Collections.addAll(list, values);
//     return list;
// }


import javafixes.common.StreamUtil;
import org.junit.Test;
import java.util.Iterator;
import java.util.stream.Stream;
import static java.util.stream.Collectors.toList;
import static javafixes.collection.CollectionUtil.newList;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat;
package javafixes.io;




public class InputStreamUtilTest {

    @Test
    public void shouldCreateStreamFromIterable() {
        Iterable<String> iterable = newList("Hello", "World", "!");

// Path: src/main/java/javafixes/common/StreamUtil.java
// public class StreamUtil {
// 
//     public static <T> Stream<T> toStream(Iterable<T> iterable) {
//         return StreamSupport.stream(iterable.spliterator(), false);
//     }
// 
//     public static <T> Stream<T> toStream(Iterator<T> iterator) {
//         return toStream(() -> iterator);
//     }
// }
// 
// Path: src/main/java/javafixes/collection/CollectionUtil.java
// @SafeVarargs
// public static <T> ArrayList<T> newList(T... values) {
//     ArrayList<T> list = new ArrayList<T>(values.length);
//     Collections.addAll(list, values);
//     return list;
// }


// Path: src/test/java/javafixes/io/InputStreamUtilTest.java
import javafixes.common.StreamUtil;
import org.junit.Test;
import java.util.Iterator;
import java.util.stream.Stream;
import static java.util.stream.Collectors.toList;
import static javafixes.collection.CollectionUtil.newList;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat;

package javafixes.io;




public class InputStreamUtilTest {

    @Test
    public void shouldCreateStreamFromIterable() {
        Iterable<String> iterable = newList("Hello", "World", "!");

        Stream<String> stream = StreamUtil.toStream(iterable);