@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()); }
@Test public void shouldReturnString() throws Exception { String result = ds.execute(() -> TEST); assertEquals(TEST, result); }