Exemplo n.º 1
0
 @Test
 public void shouldFilterResult() throws Exception {
   Optional<String> result =
       ds.list()
           .stream()
           .peek(System.out::println)
           .map(String::toUpperCase)
           .peek(System.out::println)
           .reduce((a, b) -> a + b);
   assertTrue(result.isPresent());
   assertEquals(TEST, result.get());
 }
Exemplo n.º 2
0
 @Test
 public void shouldReturnString() throws Exception {
   String result = ds.execute(() -> TEST);
   assertEquals(TEST, result);
 }