diff --git a/src/tests/java8/StreamTest.java b/src/tests/java8/StreamTest.java new file mode 100644 index 00000000..5d661a9a --- /dev/null +++ b/src/tests/java8/StreamTest.java @@ -0,0 +1,30 @@ +package java8; + +import gov.nasa.jpf.util.test.TestJPF; +import java.util.function.Supplier; +import org.junit.Test; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; + +public class StreamTest { + public static List allToUpperCase(List words) { + return words.stream() + .map(string -> string.toUpperCase()) + .collect(Collectors.toList()); + } + +@Test +public void multipleWordsToUppercase() { + List input = Arrays.asList("a", "b", "hello"); + List result = allToUpperCase(input); + assertEquals(asList("A", "B", "HELLO"), result); + } + private void assertEquals(Object asList, List result) { + } + + + private Object asList(String string, String string2, String string3) { + return null; + } +}