From 62c59c82ceccfdb81ae627656145c320509a78d5 Mon Sep 17 00:00:00 2001 From: slavisa-baeldung Date: Sat, 21 Jan 2017 08:06:30 +0100 Subject: [PATCH] BAEL-583 - minor changes --- .../baeldung/java8/Java8FindAnyFindFirstTest.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/core-java/src/test/java/com/baeldung/java8/Java8FindAnyFindFirstTest.java b/core-java/src/test/java/com/baeldung/java8/Java8FindAnyFindFirstTest.java index d312a6206f..6a2b89963c 100644 --- a/core-java/src/test/java/com/baeldung/java8/Java8FindAnyFindFirstTest.java +++ b/core-java/src/test/java/com/baeldung/java8/Java8FindAnyFindFirstTest.java @@ -17,7 +17,7 @@ public class Java8FindAnyFindFirstTest { @Test public void createStream_whenFindAnyResultIsPresent_thenCorrect() { - List list = Arrays.asList("A","B","C","D"); + List list = Arrays.asList("A", "B", "C", "D"); Optional result = list.stream().findAny(); @@ -26,26 +26,26 @@ public class Java8FindAnyFindFirstTest { } @Test - public void createParallelStream_whenFindAnyResultIsPresent_ThenCorrect() throws Exception { - List list = Arrays.asList(1,2,3,4,5); + public void createParallelStream_whenFindAnyResultIsPresent_thenCorrect() throws Exception { + List list = Arrays.asList(1, 2, 3, 4, 5); Optional result = list .stream() .parallel() - .filter(num -> num<4) + .filter(num -> num < 4) .findAny(); assertTrue(result.isPresent()); - assertThat(result.get(),anyOf(is(1), is(2), is(3))); + assertThat(result.get(), anyOf(is(1), is(2), is(3))); } @Test public void createStream_whenFindFirstResultIsPresent_thenCorrect() { - List list = Arrays.asList("A","B","C","D"); + List list = Arrays.asList("A", "B", "C", "D"); Optional result = list.stream().findFirst(); assertTrue(result.isPresent()); - assertThat(result.get(),is("A")); + assertThat(result.get(), is("A")); } }