@Test public void testMap() throws Exception { final CompletionStage<String> future = successful("hello"); final CompletionStage<Integer> result = map(future, s -> s.length()); assertThat(result.toCompletableFuture().join()).isEqualTo(5); }
@Test public void testMap() throws Exception { final CompletionStage<String> future = successful("hello"); final CompletionStage<Integer> result = map(future, s -> s.length()); assertThat(result.toCompletableFuture().join()).isEqualTo(5); }